mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 19:37:49 +00:00
Bump to v4.7.0.
This commit is contained in:
5
times.js
5
times.js
@@ -1,4 +1,4 @@
|
||||
import baseCastFunction from './_baseCastFunction';
|
||||
import baseIteratee from './_baseIteratee';
|
||||
import baseTimes from './_baseTimes';
|
||||
import toInteger from './toInteger';
|
||||
|
||||
@@ -16,6 +16,7 @@ var nativeMin = Math.min;
|
||||
* each invocation. The iteratee is invoked with one argument; (index).
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Util
|
||||
* @param {number} n The number of times to invoke `iteratee`.
|
||||
@@ -37,7 +38,7 @@ function times(n, iteratee) {
|
||||
var index = MAX_ARRAY_LENGTH,
|
||||
length = nativeMin(n, MAX_ARRAY_LENGTH);
|
||||
|
||||
iteratee = baseCastFunction(iteratee);
|
||||
iteratee = baseIteratee(iteratee);
|
||||
n -= MAX_ARRAY_LENGTH;
|
||||
|
||||
var result = baseTimes(length, iteratee);
|
||||
|
||||
Reference in New Issue
Block a user