Comparing version 0.0.0 to 0.1.0
{ | ||
"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 | ||
})(); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
10407
10
141
28
0
5