Napoleonic Political Magnificence

    ordered-regions

    1.1.0 • Public • Published

    ordered-regions

    submit out of order objects and receive that data ordered sequentially and/or in groups

    install

    $ npm install ordered-regions

    usage

    const OrderedRegions = require("../ordered-regions");
     
    const TOTAL = 32;
    const or = OrderedRegions({
      total: TOTAL,
      groups: 8
    });
     
    or.onEach((item) => {
      console.log('item recevied in order');
    });
     
    or.onGroup((items) => {
      console.log('ordered group of items recevied');
    });
     
    or.onComplete(() => {
      console.log('finished ordering items');
    });
     
    for (let i = TOTAL; i >= 0; i--) {
      or.submit({id: i});
    }

    Install

    npm i ordered-regions

    DownloadsWeekly Downloads

    0

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    10 kB

    Total Files

    6

    Last publish

    Collaborators

    • silverbucket