bluebird-tools
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "bluebird-tools", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -99,1 +99,9 @@ # Bluebird Tools | ||
``` | ||
### Manipulating promises | ||
#### Promise.convert(promise) -> promise | ||
Converts a native promise to a BluebirdTools promise | ||
```js | ||
Promise.convert(promise) | ||
``` |
@@ -62,2 +62,10 @@ const Promise = require('bluebird'); | ||
Promise.convert = function convert(promise) { | ||
return new Promise((resolve, reject) => { | ||
promise | ||
.then(resolve) | ||
.catch(reject); | ||
}); | ||
}; | ||
module.exports = Promise; | ||
@@ -64,0 +72,0 @@ |
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
14574
321
106