Comparing version 3.2.5 to 3.3.0
3.3.0 / 2016-10-14 | ||
================== | ||
* feat: support promise (#51) | ||
3.2.5 / 2016-08-19 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -65,2 +65,11 @@ 'use strict'; | ||
}); | ||
} else { | ||
if (err) { | ||
self.emit('complete_error', err); | ||
} else { | ||
self.emit('complete_success', { | ||
stdout: self.stdout, | ||
stderr: self.stderr, | ||
}); | ||
} | ||
} | ||
@@ -150,3 +159,8 @@ } | ||
this.cb = cb; | ||
return this; | ||
if (!cb) { | ||
return new Promise((resolve, reject) => { | ||
this.on('complete_success', resolve); | ||
this.on('complete_error', reject); | ||
}); | ||
} | ||
}; | ||
@@ -153,0 +167,0 @@ |
{ | ||
"name": "coffee", | ||
"version": "3.2.5", | ||
"version": "3.3.0", | ||
"description": "Test command line on nodejs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
17135
353