|
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:
300 bytes
|
| Line | |
|---|
| 1 | var _optimizeCb = require('./_optimizeCb.js');
|
|---|
| 2 |
|
|---|
| 3 | // Run a function **n** times.
|
|---|
| 4 | function times(n, iteratee, context) {
|
|---|
| 5 | var accum = Array(Math.max(0, n));
|
|---|
| 6 | iteratee = _optimizeCb(iteratee, context, 1);
|
|---|
| 7 | for (var i = 0; i < n; i++) accum[i] = iteratee(i);
|
|---|
| 8 | return accum;
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | module.exports = times;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.