priority-promise

1.0.2 • Public • Published

priority-promise

Promise with Priority

Usage

import PriorityPromise from 'priority-promise';
 
let target = Promise.resolve();
new PriorityPromise(target)
  .then(()=>{
    console.log('Priority 0');
  }, null, 0)
  .then(()=>{
    console.log('Priority 1');
  }, null, 1)
  .then(()=>{
    console.log('Priority -1');
  }, null, -1);
// Priority 1
// Priority 0
// Priority -1

Readme

Keywords

none

Package Sidebar

Install

npm i priority-promise

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

3.25 kB

Total Files

4

Last publish

Collaborators

  • lomocc