Noncommital Premarital Mischief

npm

Need private packages and team management tools?Check out npm Orgs. »

rp-queue

1.1.0 • Public • Published

Install

$ npm install --save rp-queue

Usage

const RPQueue = require('rp-queue');
 
let tasks = [
    function(){
        return Promise.resolve()
    },
    function(){
        return Promise.resolve()
    },
    function(){
        return Promise.resolve()
    },
    function(){
        return Promise.resolve()
    },
    function(){
        return Promise.resolve()
    }
];
 
RPQueue(tasks, 2).then(()=>{
    console.log('done');
});
 
=======================
 
const RPQueue = require('rp-queue');
 
let tasks = [
    1,2,3,4,5
];
 
RPQueue(tasks, {
    limit: 2,
    process: tid => Promise.resolve(tid)
}).then(()=>{
    console.log('done');
});
 

install

npm i rp-queue

Downloadsweekly downloads

4

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability