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

apr-asyncify

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apr-asyncify - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

19

index.js

@@ -26,12 +26,9 @@ /**

*/
module.exports = (fn) => {
return (...args) => {
return new Promise((resolve, reject) => {
try {
resolve(fn(...args));
} catch (err) {
reject(err);
}
});
};
};
module.exports = fn => (...args) =>
new Promise((resolve, reject) => {
try {
resolve(fn(...args));
} catch (err) {
reject(err);
}
});
{
"name": "apr-asyncify",
"version": "1.0.3",
"version": "1.0.4",
"description": "Take a sync function and make it async. This is useful for plugging sync functions into a waterfall, series, or other async functions.",

@@ -13,5 +13,13 @@ "keywords": [

"control-flow",
"awaitful"
"awaitful",
"promises",
"async-await",
"es2015",
"es2016",
"es2017",
"es6",
"es7",
"es8"
],
"homepage": "https://ramitos.github.io/apr#asyncify",
"homepage": "https://apr.js.org#asyncify",
"bugs": "https://github.com/ramitos/apr/issues",

@@ -18,0 +26,0 @@ "license": "MIT",

@@ -12,2 +12,3 @@ <!-- Generated by documentation.js. Update this documentation by updating the source code. -->

- `fn`
- `function` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**

@@ -14,0 +15,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