New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

execq

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

execq

pending the operation and do them in a right time

latest
Source
npmnpm
Version
1.0.6
Version published
Weekly downloads
17
88.89%
Maintainers
1
Weekly downloads
 
Created
Source

###execQ

pending the commands and execute them in a right time.

used in project RocketEngine

####Install

npm install execq

####Usages

var execQ = new require('execq');

execQ.pend([socket, socket.write, argv]);
execQ.pend([socket, socket.write, argv]);
execQ.pend([socket, socket.write, argv]);
execQ.pend([socket, socket.write, [arg1, arg2...]]);
execQ.pend(function(){ // the codes });

// once some important jobs done
worker.on('works done', function () {
  // now go on execute the pended codes remain in queue
  execQ.goon();
});

####API

// init the max pending-queue lenght
var execQ = new require('exdecq')(maxlen);

maxlen default to 1000

// get pending queue's length
execQ.length // => x
// add a job to pending-queue
execQ.pend(operation);
  • operation {Array | Function}

ex:

// array
[object, function, [arg1, arg2, ..., argn]]
// execute a series of pended commands with a seqnum
execQ.goon(seqnum);

execute the commands from the seqnum

  • seqnum {Number} (option)
// clean the pending-queue
execQ.clean();

execQ will emit event pending on invoking .pend(), and emit event continue on finish invoking .goon()

Keywords

execQ

FAQs

Package last updated on 27 Dec 2014

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