f-sync

queue work to happen within frames to allow the UI some time to update.

Usage no npm install needed!

<script type="module">
  import fSync from 'https://cdn.skypack.dev/f-sync';
</script>

README

f-sync

queue work to happen within frames to allow the UI some time to update.

Install

npm install f-sync

Usage


var fSync = require('f-sync');

var queue = fSync(options);

queue(function(){
    // Some work to be done
});

// cancel queue mid-flight
queue.cancel(); // no more work will happen.

Example

npm run watch-example

then open example/index.html in a browser.