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});
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.02latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.02
1.0.00

Package Sidebar

Install

npm i ordered-regions

Weekly Downloads

2

Version

1.1.0

License

ISC

Unpacked Size

10 kB

Total Files

6

Last publish

Collaborators

  • silverbucket