MCPcopy Create free account
hub / github.com/dunky11/react-saas-template / baseTimes

Function baseTimes

src/shared/functions/toArray.js:150–159  ·  view source on GitHub ↗

* The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of resul

(n, iteratee)

Source from the content-addressed store, hash-verified

148 * @returns {Array} Returns the array of results.
149 */
150function baseTimes(n, iteratee) {
151 let index = -1;
152
153 const result = Array(n);
154
155 while (++index < n) {
156 result[index] = iteratee(index);
157 }
158 return result;
159}
160
161/**
162 * The base implementation of `_.values` and `_.valuesIn` which creates an

Callers 1

arrayLikeKeysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected