deno.land / x / lodash@4.17.19 / npm-package / _initCloneArray.js

_initCloneArray.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/** Used for built-in method references. */var objectProto = Object.prototype;
/** Used to check objects for own properties. */var hasOwnProperty = objectProto.hasOwnProperty;
/** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */function initCloneArray(array) { var length = array.length, result = new array.constructor(length);
// Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result;}
module.exports = initCloneArray;
lodash

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉