n-times
Run a function 𝘕 times
Install
$ npm install n-times --save
Usage
const times = ;const beep = console; ;// => yadda// => yadda// => yadda
API
times(n, fn, ...args)
n
Required
Type: integer
Number of times to run a function.
fn
Required
Type: function
Function to run N times.
Receives the value of current iteration as the last argument.
...args
Type: arguments
List of arguments to pass to fn
on every call.
License
MIT © Rafael Rinaldi