next-thing
v0.0.3
Published
Frame, tick, and idle functions for the browser.
Downloads
38
Readme
next-thing
Frame, tick, and idle functions for the browser.
Install
$ npm i next-thing --save
Use
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. © 2017 Michael Cavalea