File manager - Edit - /usr/local/n/versions/node/10.6.0/lib/node_modules/npm/node_modules/lodash/lang/toArray.js
Back
var arrayCopy = require('../internal/arrayCopy'), getLength = require('../internal/getLength'), isLength = require('../internal/isLength'), values = require('../object/values'); /** * Converts `value` to an array. * * @static * @memberOf _ * @category Lang * @param {*} value The value to convert. * @returns {Array} Returns the converted array. * @example * * (function() { * return _.toArray(arguments).slice(1); * }(1, 2, 3)); * // => [2, 3] */ function toArray(value) { var length = value ? getLength(value) : 0; if (!isLength(length)) { return values(value); } if (!length) { return []; } return arrayCopy(value); } module.exports = toArray;
| ver. 1.4 |
Github
|
.
| PHP 8.3.31 | Generation time: 0 |
proxy
|
phpinfo
|
Settings