Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

synchify

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

synchify

use async-await pattern on any function that's using callbacks

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

synchify

This node module provides a utility function to use async-await pattern on any function that's using callbacks

Usage

npm install [--save] synchify

Code Sample


const obj1 = {
  f1: function(param1, param2, callback) {
    // do something and call the callback with or without the error
    return callback(null, { some: "result"});
  }
}

var synchify = require('synchify');

try {
  var result = await syncify(obj1, 'f1', param1, param2);
}
catch(err) {
  // if an error was returned, it will be catched here
}

License

MIT

Keywords

FAQs

Package last updated on 09 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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