|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
504 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * The base implementation of `_.times` without support for iteratee shorthands
|
|---|
| 3 | * or max array length checks.
|
|---|
| 4 | *
|
|---|
| 5 | * @private
|
|---|
| 6 | * @param {number} n The number of times to invoke `iteratee`.
|
|---|
| 7 | * @param {Function} iteratee The function invoked per iteration.
|
|---|
| 8 | * @returns {Array} Returns the array of results.
|
|---|
| 9 | */
|
|---|
| 10 | function baseTimes(n, iteratee) {
|
|---|
| 11 | var index = -1,
|
|---|
| 12 | result = Array(n);
|
|---|
| 13 |
|
|---|
| 14 | while (++index < n) {
|
|---|
| 15 | result[index] = iteratee(index);
|
|---|
| 16 | }
|
|---|
| 17 | return result;
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | module.exports = baseTimes;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.