pipe-functions
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -1,3 +0,4 @@ | ||
var pipe = function() {return Array.prototype.slice.call(arguments).reduce(function(v, f) {return v.constructor === Function ? v() : v.then ? v.then(function(v) {return f(v); }) : f(v);});}; | ||
if (typeof module !== 'undefined' && module.exports) | ||
module.exports = pipe; | ||
'use strict'; | ||
const pipe = (...fns) => fns.reduce((v, f) => v.constructor === Function ? f(v()) : v.then ? v.then(v => f(v)) : f(v)); | ||
module.exports = pipe; |
{ | ||
"name": "pipe-functions", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Pipe functions in a Unix-like style. It supports Promises (async) anywhere in the pipeline and every step will be executed sequentially. The return (resolve in case of Promises) of each function will be passed in as an argument to the next one", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/DiegoZoracKy/pipe-functions/", |
@@ -11,3 +11,3 @@ # pipe-functions | ||
- First argument can be of any type (`String`, `Number`, `Date`, etc.) or even a `Function` or a `Promise` | ||
- Browser and Node.js ready | ||
- Node.js and Browser ready (to be used on a Browser, without a build step, check `lib/pipe-non-es6.js`) | ||
- Lightweight, **267 bytes** (190 bytes gzipped) | ||
@@ -14,0 +14,0 @@ |
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
8357