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

queueable-js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queueable-js

Simple queuing functionality with event emitter async call.

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

queueable-js

Version Build Twitter Follow

Simple queuing functionality with event emitter async call.

Forked and Inspired from async-function-queue

Installation

$ yarn add queueable-js

or,
$ npm install queueable-js

Usage

import Queue from "queueable-js"

const concurrency = 2

// create a queue, defining concurrency
const queue = Queue(concurrency)

// push a function that accepts a callback
// as sole argument
queue.push(function(cb) {
  setTimeout(cb, 1000)
});

Events

// Some emitted events

// queue.event() will returns an instance of EventEmitter
 
queue.event().on('entry', function() {
  console.log('starting to execute function')
})
 
queue.event().on('exit', function() {
  console.log('finished executing function')
})

queue.event().on('drain', function() {
  console.log('queue has drained')
})

Keywords

FAQs

Package last updated on 24 Dec 2019

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