New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

worq

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

worq

Promising job queue

  • 2.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
decreased by-57.89%
Maintainers
1
Weekly downloads
 
Created
Source

worq

Promising job queue

Run promises in series or with a configurable concurrency limit

Build Status Code Quality Code Coverage NPM Version

Install

$ npm install --save worq

Usage

const Queue = require('worq');

let queue = new Queue();

queue.run([

    () => somePromisingFunction(),
    () => someOtherPromisingFunction(),
    () => someNormalFunction()
    
    // these functions will be executed in series
    
]).then(results => {

    // results will be an array containing the return / fulfillment values
    
});

API

Queue([options])

options
concurrency

Type: number Default: 1

The maximum number of jobs that can run simultaneously

Queue.run(jobs)

jobs

Type: Function[]

An array of jobs. Jobs may return/throw regularly or return a promise.

Returns a promise for an array containing the fulfillment values in the same order.

Queue.cancel()

Cancels the remaining jobs.

License

MIT © JM Versteeg

dependency Status devDependency Status

Keywords

FAQs

Package last updated on 30 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc