otesuki(お手隙)
Minimal task queue executed when CPU is idle
Install
npm install otesuki
Usage
; ; ; queue.push;queue.push;
API
new Queue
;
Argument | Required | Description | Default |
---|---|---|---|
executor | Yes | task executor function. Is must return Promise | |
option | - | Option object (see below) | {} |
option.debug | - | Log verbosely | false |
option.retry | - | Count of retry | 3 |
Queue.push
queue.push;
Queue.push can receive any objects.
It will passed to argument of executor
.
For TypeScript
otesuki supports TypeScript.
queue.push
Development
git clone git@github.com:xxx/otesuki.git # Your forked package
cd otesuki
npm i
npx lerna bootstrap
License
This package under MIT license.