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

outcome

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

outcome - npm Package Compare versions

Comparing version 0.0.12 to 0.0.14

test/outcome-test.js

27

lib/index.js

@@ -10,3 +10,15 @@ var EventEmitter = require('events').EventEmitter,

var runFn = function(event, callback, args) {
if(!!listeners[callback].emit) {
listeners[callback].emit.apply(listeners[callback], [event].concat(args));
} else {
listeners[callback].apply(this, args);
}
}
var runErr = function(args) {
runFn("error", "error", args);
}
var fn = function() {

@@ -30,8 +42,7 @@

//error should always be first args
var err = args.shift();
var e = args.shift();
//on error
if(err) {
listeners.error.call(this, err);
if(e) {
runErr.call(this, [e]);
} else

@@ -41,5 +52,5 @@

try {
listeners.success.apply(this, args);
runFn.call(this, "complete", "success", args);
} catch(e) {
listeners.error.call(this, err)
runErr.call(this, [e]);
}

@@ -133,2 +144,6 @@ }

module.exports.once = function() {
globalEmitter.once.apply(globalEmitter, arguments);
}
//bleh this could be better. Need to copy the chain functions to the module.exports var

@@ -135,0 +150,0 @@ var chain = Chain();

@@ -10,7 +10,13 @@ {

"repository": {},
"version": "0.0.12",
"version": "0.0.14",
"engines": {},
"dependencies": {},
"devDependencies": {},
"devDependencies": {
"expect.js": "0.2.x",
"mocha":"1.8.x"
},
"scripts": {
"test": "mocha --reporter min"
},
"main": "./lib/index.js"
}
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