Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

seq

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seq - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

2

index.js

@@ -26,3 +26,3 @@ var EventEmitter = require('events').EventEmitter;

function builder (saw, xs) {
var context = this.context = {
var context = {
vars : {},

@@ -29,0 +29,0 @@ args : {},

{
"name" : "seq",
"version" : "0.3.1",
"version" : "0.3.2",
"description" : "Chainable asynchronous flow control with sequential and parallel primitives and pipeline-style error handling",

@@ -5,0 +5,0 @@ "main" : "./index.js",

@@ -755,1 +755,26 @@ var Seq = require('seq');

};
exports.regressionTestForAccidentalDeepTraversalOfTheContext = function () {
// Create a single-item stack with a bunch of references to other objects:
var stack = [{}];
for (var i = 0 ; i < 10000 ; i += 1) {
stack[0][i] = stack[0];
}
var startTime = new Date(),
numCalled = 0,
to = setTimeout(function () {
assert.fail('never got to the end of the chain');
}, 1000);
Seq(stack)
.parEach(function (item) {
numCalled += 1;
this();
})
.seq(function () {
clearTimeout(to);
assert.eql(numCalled, 1);
assert.ok((new Date().getTime() - startTime) < 1000, 'if this test takes longer than a second, the bug must have been reintroduced');
});
};
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