every-time

Declarative setInterval

Declarative setInterval. See also: after-time

every = require('every-time')
 
every('5 mins, 5 seconds', function(){
  console.log('hello')
})

Full Language Reference: english-time

$ npm install every-time
every = require('every-time')
 
every('1s 250ms', function(){
  // do something 
})

Passing parameters:

every('5 secs', 'foo', 'bar', function(foobar) {
 
  foo
  // => 'foo' 
 
  bar
  // => 'bar' 
 
})