New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1 to 1.0.2

readme.md

25

index.js

@@ -0,1 +1,26 @@

/**
* <a id="asyncify"></a>
* Take a sync function and make it async. This is useful for plugging sync functions into a [`waterfall`](#waterfall), [`series`](#series), or other async functions.
*
* [![](https://img.shields.io/npm/v/apr-asyncify.svg?style=flat-square)](https://www.npmjs.com/package/apr-asyncify) [![](https://img.shields.io/npm/l/apr-asyncify.svg?style=flat-square)](https://www.npmjs.com/package/apr-asyncify)
*
* @kind function
* @name asyncify
* @param {Function} function
* @returns {Function}
*
* @example
* import awaitify from 'apr-awaitify';
* import asyncify from 'apr-asyncify';
* import waterfall from 'apr-waterfall';
* import apply from 'apr-apply';
*
* const readFile = awaitify(require('fs').readFile);
* const pkgPath = path.join(__dirname, './package.json');
*
* const pkg = await waterfall([
* apply(readFile, pkgPath, 'utf8'),
* asyncify(JSON.parse)
* ]);
*/
module.exports = (fn) => {

@@ -2,0 +27,0 @@ return (...args) => {

2

package.json
{
"name": "apr-asyncify",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/ramitos/apr/tree/master/packages/asyncify",

@@ -5,0 +5,0 @@ "license": "MIT",

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