UNPKG

si-funciona

Version:

Funciones de utilidad para uso general. [General usage utility functions.]

24 lines (22 loc) 657 B
'use strict' Object.defineProperty(exports, '__esModule', { value: true }) exports.default = void 0 require('core-js/stable') /** * Leverage buildArrayBase to generate an array filled with references to the provided item. * The length defines how long the array should be. * @memberOf module:arrayHelpers * @param {*} item - The item to be used for each array element * @param {number} length - The desired length of the array * @returns {Array.<*>} */ const buildArrayOfReferences = (item, length) => { const arr = [] while (arr.length < length) { arr.push(item) } return arr } var _default = exports.default = buildArrayOfReferences