Comparing version 0.0.12 to 0.0.13
12
index.js
@@ -15,3 +15,2 @@ var outcome = require('outcome'), | ||
c1p = c1p instanceof Array ? c1p : [c1p]; | ||
@@ -26,2 +25,5 @@ c2p = c2p instanceof Array ? c2p : [c2p]; | ||
var msg = arguments[0]; | ||
//error object | ||
if(msg.message) msg = msg.message; | ||
@@ -278,10 +280,8 @@ for(var i = 1, n = arguments.length; i < n; i++) | ||
{ | ||
var em = new EventEmitter(); | ||
return outcome.chain(em, function(response) { | ||
return outcome.handle(function(response) { | ||
if(response.errors) { | ||
em.emit('error', response.errors); | ||
this.error(response.errors); | ||
} else { | ||
em.emit('result', response.result || true); | ||
this.success(response.result || true); | ||
} | ||
@@ -288,0 +288,0 @@ }); |
{ | ||
"name": "vine", | ||
"description": "API builder", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"author": "Craig Condon", | ||
@@ -11,5 +11,5 @@ "repository": { | ||
"dependencies": { | ||
"outcome":"*" | ||
"outcome": "*" | ||
}, | ||
"main": "./index.js" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24327
230