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

asyncpipe

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncpipe - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

.babelrc

19

package.json
{
"name": "asyncpipe",
"version": "0.0.0",
"description": "\u0016Functional composition library for asynchronous functions",
"version": "0.1.0",
"description": "Functional composition library for asynchronous functions",
"main": "dist",
"scripts": {
"prebuild": "npm run lint",
"build": "babel src --out-dir dist --copy-files --source-maps inline",
"lint": "eslint --fix src",
"test": "echo \"Error: no test specified\" && exit 1"
},
"precommit": "build",
"repository": {

@@ -27,3 +31,10 @@ "type": "git",

},
"homepage": "https://github.com/HiFaraz/asyncpipe#readme"
}
"homepage": "https://github.com/HiFaraz/asyncpipe#readme",
"devDependencies": {
"babel-cli": "^6.22.2",
"babel-polyfill": "^6.22.0",
"babel-preset-latest": "^6.22.0",
"eslint": "^3.13.1",
"pre-commit": "^1.2.2"
}
}
# asyncpipe
Functional composition library for asynchronous functions in JavaScript
Like lodash.flow, but for Promises!
## Installation
`$ npm install --save asyncpipe`
## Example
```js
import 'asyncpipe';
(async() => {
const a = x => x + 1;
const b = x => Promise.resolve(x * 2);
const c = async x => {
await ExternalService.store(x);
return x;
};
const result = await asyncpipe(
a,
b,
c,
)(99);
console.log(result); // PRINTS: 200
})();
```
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