From 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Wed, 18 Nov 2020 23:26:45 +0100 Subject: rm node_modules --- node_modules/mongoose/lib/helpers/arrayDepth.js | 30 ------------------------- 1 file changed, 30 deletions(-) delete mode 100644 node_modules/mongoose/lib/helpers/arrayDepth.js (limited to 'node_modules/mongoose/lib/helpers/arrayDepth.js') 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 -- cgit v1.2.3