first commit
This commit is contained in:
17
build/node_modules/p-pipe/index.js
generated
vendored
Normal file
17
build/node_modules/p-pipe/index.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
// TODO: Use rest/spread when targeting Node.js 6
|
||||
|
||||
module.exports = function (input) {
|
||||
const args = Array.isArray(input) ? input : arguments;
|
||||
|
||||
if (args.length === 0) {
|
||||
return Promise.reject(new Error('Expected at least one argument'));
|
||||
}
|
||||
|
||||
return [].slice.call(args, 1).reduce((a, b) => {
|
||||
return function () {
|
||||
return Promise.resolve(a.apply(null, arguments)).then(b);
|
||||
};
|
||||
}, args[0]);
|
||||
};
|
||||
9
build/node_modules/p-pipe/license
generated
vendored
Normal file
9
build/node_modules/p-pipe/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
76
build/node_modules/p-pipe/package.json
generated
vendored
Normal file
76
build/node_modules/p-pipe/package.json
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"p-pipe@1.2.0",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "p-pipe@1.2.0",
|
||||
"_id": "p-pipe@1.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-SxoROZoRUgpneQ7loMHViB1r7+k=",
|
||||
"_location": "/p-pipe",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "p-pipe@1.2.0",
|
||||
"name": "p-pipe",
|
||||
"escapedName": "p-pipe",
|
||||
"rawSpec": "1.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/imagemin"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz",
|
||||
"_spec": "1.2.0",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/p-pipe/issues"
|
||||
},
|
||||
"description": "Compose promise-returning & async functions into a reusable pipeline",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/p-pipe#readme",
|
||||
"keywords": [
|
||||
"promise",
|
||||
"pipe",
|
||||
"pipeline",
|
||||
"compose",
|
||||
"composition",
|
||||
"combine",
|
||||
"flow",
|
||||
"serial",
|
||||
"functions",
|
||||
"reusable",
|
||||
"async",
|
||||
"await",
|
||||
"promises",
|
||||
"bluebird"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "p-pipe",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/p-pipe.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.2.0"
|
||||
}
|
||||
53
build/node_modules/p-pipe/readme.md
generated
vendored
Normal file
53
build/node_modules/p-pipe/readme.md
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# p-pipe [](https://travis-ci.org/sindresorhus/p-pipe)
|
||||
|
||||
> Compose promise-returning & async functions into a reusable pipeline
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install p-pipe
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const pPipe = require('p-pipe');
|
||||
|
||||
const addUnicorn = str => Promise.resolve(`${str} Unicorn`);
|
||||
const addRainbow = str => Promise.resolve(`${str} Rainbow`);
|
||||
|
||||
const pipeline = pPipe(addUnicorn, addRainbow);
|
||||
|
||||
pipeline('❤️').then(console.log);
|
||||
//=> '❤️ Unicorn Rainbow'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### pPipe(input, …)
|
||||
|
||||
The `input` functions are applied from left to right.
|
||||
|
||||
You can also specify an array as the first argument instead of multiple function arguments. Mostly only useful if you have to support Node.js 4. With Node.js 6 and above you can just use spread syntax.
|
||||
|
||||
#### input
|
||||
|
||||
Type: `Function`
|
||||
|
||||
Expected to return a `Promise` or any value.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [p-each-series](https://github.com/sindresorhus/p-each-series) - Iterate over promises serially
|
||||
- [p-series](https://github.com/sindresorhus/p-series) - Run promise-returning & async functions in series
|
||||
- [p-waterfall](https://github.com/sindresorhus/p-waterfall) - Run promise-returning & async functions in series, each passing its result to the next
|
||||
- [More…](https://github.com/sindresorhus/promise-fun)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Reference in New Issue
Block a user