MCPcopy
hub / github.com/lodash/lodash / baseTimes

Function baseTimes

lodash.js:986–994  ·  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 ar

(n, iteratee)

Source from the content-addressed store, hash-verified

984 * @returns {Array} Returns the array of results.
985 */
986 function baseTimes(n, iteratee) {
987 var index = -1,
988 result = Array(n);
989
990 while (++index < n) {
991 result[index] = iteratee(index);
992 }
993 return result;
994 }
995
996 /**
997 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array

Callers 3

arrayLikeKeysFunction · 0.85
unzipFunction · 0.85
timesFunction · 0.85

Calls 1

iterateeFunction · 0.70

Tested by

no test coverage detected