https://github.com/azer/after-time
Declarative setTimeout
https://github.com/azer/after-time
Last synced: 12 months ago
JSON representation
Declarative setTimeout
- Host: GitHub
- URL: https://github.com/azer/after-time
- Owner: azer
- Created: 2013-05-18T07:29:53.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-01-15T00:28:14.000Z (over 12 years ago)
- Last Synced: 2025-04-09T08:01:35.367Z (about 1 year ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## after-time
Declarative setTimeout based on [english-time](http://github.com/azer/english-time)
```js
after = require('after-time')
after('150ms', function(){
console.log('yo!')
})
after('5 minutes', function(){
console.log('hello!')
})
after('3 Hours, 15 Minutes and 20 Milliseconds', function(){
console.log('yo!')
})
after('3h 15m 20ms', 'foo', 'bar', function(foo, bar){
foo
// => 'foo'
bar
// => 'bar'
})
```
## Install
```bash
$ npm install after-time
```
