frame-queue
Queue up events, triggering once at the beginning of the next frame to reduce over-updating visual elements.
Usage
queue = frameQueue()
Creates a new frame queue to listen to and trigger.
queue(event)
Queues up an event
to be triggered in the next frame. You can do this
multiple times in a single frame and know that the update will only fire the
one time it needs to.
queue.on(event, callback)
Listen to events named event
, calling callback
when they're fired.
var createQueue =var model = _value: 'lorem'modelelement = documentmodelqueue =Objectfor var i = 0; i < 100; i++modelvalue = 'ipsum'
License
MIT. See LICENSE.md for details.