Sha256: b7ade25dc87a92cbfe80c8851dafb1d5421b96986ec62086bcb8790180280a40
Contents?: true
Size: 696 Bytes
Versions: 167
Compression:
Stored size: 696 Bytes
Contents
/** Used for native 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 array 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;
Version data entries
167 entries across 87 versions & 9 rubygems