async-deco
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "async-deco", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A collection of decorators you can use to wrap functions (callback or promise based) to make them more robust", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -179,2 +179,16 @@ async-deco | ||
Promisify | ||
--------- | ||
Convert a callback based function to a function returning a promise. (It uses https://www.npmjs.com/package/es6-promisify) | ||
```js | ||
var promisify = require('async-deco/utils/promisify'); | ||
var func = promisify(function (a, b, next){ | ||
return next(undefined, a + b); | ||
}); | ||
func(4, 6).then(function (result){ | ||
... // result === 10 here | ||
}) | ||
``` | ||
Compose | ||
@@ -181,0 +195,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
50540
52
1414
207