https://github.com/callmecavs/next-thing
Frame, tick, and idle functions for the browser.
https://github.com/callmecavs/next-thing
frame idle next tick
Last synced: 6 months ago
JSON representation
Frame, tick, and idle functions for the browser.
- Host: GitHub
- URL: https://github.com/callmecavs/next-thing
- Owner: callmecavs
- Created: 2017-03-16T04:03:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-16T04:38:46.000Z (over 8 years ago)
- Last Synced: 2024-12-22T23:03:28.641Z (6 months ago)
- Topics: frame, idle, next, tick
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# next-thing
[](https://www.npmjs.com/package/next-thing) [](http://standardjs.com/)
Frame, tick, and idle functions for the browser.
## Install
```sh
$ npm i next-thing --save
```## Use
```javascript
import * as next from 'next-thing'// runs in the next frame
next.frame(() => console.log('Next frame.'))// runs in the next tick
next.tick(() => console.log('Next tick.'))// runs when the browser is idle
next.idle(() => console.log('Next idle.'))
```## License
[MIT](https://opensource.org/licenses/MIT). © 2017 Michael Cavalea