0.0.1 • Published 12 years ago
pulsed v0.0.1
pulsed
Run a function n amount of times with a given interval pattern
install
npm
$ npm install pulsed --savecomponent
$ component install jwerle/pulsed --saveusage
var pulsed = require('pulsed')
var fn = pulsed([250, 500], Infinity, function () {
console.log('beep', Date.now());
});This will run a function forever with a timeout pattern of 250ms and 500ms.
api
function pulsed (/* Array */pattern, /* Number */ count, /* Function */ fn)license
MIT
0.0.1
12 years ago