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/_initCloneArray.js | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 includes/external/school/node_modules/lodash/_initCloneArray.js (limited to 'includes/external/school/node_modules/lodash/_initCloneArray.js') diff --git a/includes/external/school/node_modules/lodash/_initCloneArray.js b/includes/external/school/node_modules/lodash/_initCloneArray.js new file mode 100644 index 0000000..078c15a --- /dev/null +++ b/includes/external/school/node_modules/lodash/_initCloneArray.js @@ -0,0 +1,26 @@ +/** 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; -- cgit