You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
var optimizeCb = require('./optimizeCb'); |
|
exports = function(n, fn, ctx) { |
|
var ret = Array(Math.max(0, n)); |
|
fn = optimizeCb(fn, ctx, 1); |
|
for (var i = 0; i < n; i++) { |
|
ret[i] = fn(i); |
|
} |
|
return ret; |
|
}; |
|
|
|
module.exports = exports;
|
|
|