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

kgo

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kgo - npm Package Compare versions

Comparing version 3.1.2 to 3.2.0

2

package.json
{
"name": "kgo",
"version": "3.1.2",
"version": "3.2.0",
"description": "Flow control the super easy way",

@@ -5,0 +5,0 @@ "main": "kgo.js",

@@ -13,8 +13,18 @@ var stackSlice = require('stack-slice'),

this._task.fn.apply(this, this._args.concat([function(error){
function complete(error){
if(step._complete){
throw new Error('Step callback called more than once for task: ' + step._task.names);
}
step._complete = true;
var result = Array.prototype.slice.call(arguments, 1);
step.done(error, result);
}]));
}
this._task.fn.apply(this, this._args.concat([complete]));
};
Step.prototype.done = function(error, result){
if(error){

@@ -21,0 +31,0 @@ if(error instanceof Error){

@@ -507,2 +507,21 @@ var test = require('tape'),

});
});
test('done called more than once', function(t){
t.plan(2);
var d = require('domain').create();
d.on('error', function(error){
t.ok(error instanceof Error, 'error is instance of Error');
t.equal(error.message, 'Step callback called more than once for task: someTask');
});
d.run(function(){
kgo
('someTask', function(done){
done();
done();
});
});
});
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