You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

async-deco

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-deco - npm Package Compare versions

Comparing version

to
1.0.1

utils/promisify.js

2

package.json
{
"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 @@ -------