summaryrefslogtreecommitdiffstats
path: root/node_modules/mongoose/lib/helpers/arrayDepth.js
diff options
context:
space:
mode:
authorGravatar Piotr Russ <mail@pruss.it> 2020-11-18 23:26:45 +0100
committerGravatar Piotr Russ <mail@pruss.it> 2020-11-18 23:26:45 +0100
commit81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch)
tree8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/mongoose/lib/helpers/arrayDepth.js
parent1870f3fdf43707a15fda0f609a021f516f45eb63 (diff)
downloadwebsite_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz
website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2
website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip
rm node_modules
Diffstat (limited to 'node_modules/mongoose/lib/helpers/arrayDepth.js')
-rw-r--r--node_modules/mongoose/lib/helpers/arrayDepth.js30
1 files changed, 0 insertions, 30 deletions
diff --git a/node_modules/mongoose/lib/helpers/arrayDepth.js b/node_modules/mongoose/lib/helpers/arrayDepth.js
deleted file mode 100644
index 2c6f2e5..0000000
--- a/node_modules/mongoose/lib/helpers/arrayDepth.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-module.exports = arrayDepth;
-
-function arrayDepth(arr) {
- if (!Array.isArray(arr)) {
- return { min: 0, max: 0, containsNonArrayItem: true };
- }
- if (arr.length === 0) {
- return { min: 1, max: 1, containsNonArrayItem: false };
- }
-
- const res = arrayDepth(arr[0]);
-
- for (let i = 1; i < arr.length; ++i) {
- const _res = arrayDepth(arr[i]);
- if (_res.min < res.min) {
- res.min = _res.min;
- }
- if (_res.max > res.max) {
- res.max = _res.max;
- }
- res.containsNonArrayItem = res.containsNonArrayItem || _res.containsNonArrayItem;
- }
-
- res.min = res.min + 1;
- res.max = res.max + 1;
-
- return res;
-} \ No newline at end of file