From 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 23 Feb 2023 19:34:56 +0100 Subject: Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated) --- school/node_modules/lodash/toArray.js | 58 ----------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 school/node_modules/lodash/toArray.js (limited to 'school/node_modules/lodash/toArray.js') diff --git a/school/node_modules/lodash/toArray.js b/school/node_modules/lodash/toArray.js deleted file mode 100644 index 9809584..0000000 --- a/school/node_modules/lodash/toArray.js +++ /dev/null @@ -1,58 +0,0 @@ -var Symbol = require('./_Symbol'), - copyArray = require('./_copyArray'), - getTag = require('./_getTag'), - isArrayLike = require('./isArrayLike'), - isString = require('./isString'), - iteratorToArray = require('./_iteratorToArray'), - mapToArray = require('./_mapToArray'), - setToArray = require('./_setToArray'), - stringToArray = require('./_stringToArray'), - values = require('./values'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** Built-in value references. */ -var symIterator = Symbol ? Symbol.iterator : undefined; - -/** - * Converts `value` to an array. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. - * @example - * - * _.toArray({ 'a': 1, 'b': 2 }); - * // => [1, 2] - * - * _.toArray('abc'); - * // => ['a', 'b', 'c'] - * - * _.toArray(1); - * // => [] - * - * _.toArray(null); - * // => [] - */ -function toArray(value) { - if (!value) { - return []; - } - if (isArrayLike(value)) { - return isString(value) ? stringToArray(value) : copyArray(value); - } - if (symIterator && value[symIterator]) { - return iteratorToArray(value[symIterator]()); - } - var tag = getTag(value), - func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); - - return func(value); -} - -module.exports = toArray; -- cgit