Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.0.0 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 @@ -------

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc