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

timequeue

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timequeue - npm Package Compare versions

Comparing version
0.2.2
to
0.2.3
+12
-2
.travis.yml
language: node_js
node_js:
- 0.8
- 0.10
- "0.12"
- "iojs"
- "4"
- "6"
notifications:
email:
on_success: change
on_failure: change
sudo: false
after_success:
- npm install -g codecov
- codecov
+2
-3

@@ -1,4 +0,3 @@

var EventEmitter = require('events').EventEmitter
, util = require('util')
;
var EventEmitter = require('events').EventEmitter;
var util = require('util');

@@ -5,0 +4,0 @@

{
"name": "timequeue",
"description": "A queue with custom concurrency and time limits.",
"keywords": ["queue", "flow", "time"],
"version": "0.2.2",
"keywords": [
"queue",
"flow",
"time"
],
"version": "0.2.3",
"repository": {

@@ -13,3 +17,3 @@ "type": "git",

"scripts": {
"test": "mocha -R spec test/*-test.js"
"test": "istanbul cover node_modules/.bin/_mocha -- test/*-test.js"
},

@@ -20,8 +24,7 @@ "directories": {

"devDependencies": {
"mocha": "x"
"istanbul": "*",
"mocha": "*",
"sinon": "*"
},
"licenses": [ {
"type": "MIT",
"url" : "http://github.com/fent/timequeue.js/raw/master/LICENSE"
}]
"license": "MIT"
}

@@ -1,5 +0,8 @@

# timequeue.js [![Build Status](https://secure.travis-ci.org/fent/timequeue.js.png)](http://travis-ci.org/fent/timequeue.js)
# timequeue.js
A queue with custom concurrency and time limits. Inspired by [caolan/async#queue](https://github.com/caolan/async#queue), but with variable number of arguments in the worker, events, and with optional time limits.
[![Build Status](https://secure.travis-ci.org/fent/timequeue.js.svg)](http://travis-ci.org/fent/timequeue.js)
[![Dependency Status](https://gemnasium.com/fent/timequeue.js.svg)](https://gemnasium.com/fent/timequeue.js)
[![codecov](https://codecov.io/gh/fent/timequeue.js/branch/master/graph/badge.svg)](https://codecov.io/gh/fent/timequeue.js)

@@ -6,0 +9,0 @@ # Usage

@@ -1,4 +0,4 @@

var TimeQueue = require('..')
, assert = require('assert')
;
var TimeQueue = require('..');
var assert = require('assert');
var sinon = require('sinon');

@@ -10,2 +10,6 @@

var clock;
before(function() { clock = sinon.useFakeTimers(); });
after(function() { clock.restore(); });
function runTest(type, worker) {

@@ -15,3 +19,4 @@ describe('Create a queue with a time limit with ' + type, function() {

it('Amount of concurrent tasks are not executed over the time limit', function(done) {
it('Amount of concurrent tasks are not executed over the time limit',
function(done) {
var tid, n = 0, m = 0, timedOut = true;

@@ -33,2 +38,5 @@

}, every - 4); // setTimeout lags by 4ms on avg
process.nextTick(function() {
clock.tick(every);
});
}

@@ -58,2 +66,3 @@ }

setTimeout(callback.bind(null, n), ms);
clock.tick(ms);
});

@@ -64,2 +73,3 @@

setTimeout(callback.bind(null, n), ms);
clock.tick(ms);
});

@@ -1,4 +0,3 @@

var TimeQueue = require('..')
, assert = require('assert')
;
var TimeQueue = require('..');
var assert = require('assert');

@@ -51,2 +50,11 @@

});
describe('With default options', function() {
var q = new TimeQueue(process.nextTick.bind(process));
it('Has defaults set', function() {
assert.equal(q.concurrency, 1);
assert.equal(q.every, 0);
assert.equal(q.timeout, 0);
});
});
});

@@ -143,2 +151,16 @@

describe('Create a queue with a callback called twice', function() {
it('Throws an error', function(done) {
var q = new TimeQueue(function(callback) {
assert.throws(function() {
callback();
callback();
}, /should only be called once/);
done();
});
q.push();
});
});
describe('Create a queue then call its `die` method', function() {

@@ -145,0 +167,0 @@ var n = 0;

@@ -1,4 +0,3 @@

var TimeQueue = require('..')
, assert = require('assert')
;
var TimeQueue = require('..');
var assert = require('assert');

@@ -5,0 +4,0 @@

@@ -1,4 +0,4 @@

var TimeQueue = require('..')
, assert = require('assert')
;
var TimeQueue = require('..');
var assert = require('assert');
var sinon = require('sinon');

@@ -20,4 +20,11 @@

describe('With tasks that lag', function() {
var q = new TimeQueue(function(a, b, callback) {}, { timeout: 50 });
var clock;
before(function() { clock = sinon.useFakeTimers(); });
after(function() { clock.restore(); });
/* jshint unused: false */
var q = new TimeQueue(function(a, b, callback) {
setTimeout(callback, 100);
}, { timeout: 50 });
it('Should throw an error', function(done) {

@@ -32,2 +39,3 @@ q.push(3, 4);

});
clock.tick(100);
});

@@ -43,4 +51,5 @@

});
clock.tick(50);
});
});
});

Sorry, the diff of this file is not supported yet