repeat-time

0.0.1 • Public • Published

repeat-time

Build Status

Declarative setInterval based on english-time.

Basically a s/setTimeout/setInterval/g of after-time.

repeat = require('repeat-time')
 
repeat('150ms', function(){
  console.log('yo!')
})
 
repeat('5 minutes', function(){
  console.log('hello!')
})
 
repeat('3 Hours, 15 Minutes and 20 Milliseconds', function(){
  console.log('yo!')
})
 
repeat('3h 15m 20ms', 'foo', 'bar', function(foo, bar){
  foo // => 'foo'
 
  bar // => 'bar'
})

Install

$ npm install repeat-time

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i repeat-time

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • shime