uapte
This commit is contained in:
53
node_modules/stream-consume/README.md
generated
vendored
53
node_modules/stream-consume/README.md
generated
vendored
@@ -1,53 +0,0 @@
|
||||
# stream-consume
|
||||
|
||||
A node module ensures a Readable stream continues flowing if it's not piped to
|
||||
another destination.
|
||||
|
||||
npm install stream-consume
|
||||
|
||||
## Usage
|
||||
|
||||
Simply pass a stream to `stream-consume`.
|
||||
Both legacy streams and streams2 are supported.
|
||||
|
||||
``` js
|
||||
var consume = require('stream-consume');
|
||||
|
||||
consume(readableStream);
|
||||
```
|
||||
|
||||
## Details
|
||||
|
||||
Only Readable streams are processed (as determined by presence of `readable`
|
||||
property and a `resume` property that is a function). If called with anything
|
||||
else, it's a NOP.
|
||||
|
||||
For a streams2 stream (as determined by presence of a `_readableState`
|
||||
property), nothing is done if the stream has already been piped to at least
|
||||
one other destination.
|
||||
|
||||
`resume()` is used to cause the stream to continue flowing.
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Aron Nopanen
|
||||
|
||||
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.
|
||||
14
node_modules/stream-consume/index.js
generated
vendored
14
node_modules/stream-consume/index.js
generated
vendored
@@ -1,14 +0,0 @@
|
||||
module.exports = function(stream) {
|
||||
if (stream.readable && typeof stream.resume === 'function') {
|
||||
var state = stream._readableState;
|
||||
if (!state || state.pipesCount === 0) {
|
||||
// Either a classic stream or streams2 that's not piped to another destination
|
||||
try {
|
||||
stream.resume();
|
||||
} catch (err) {
|
||||
console.error("Got error: " + err);
|
||||
// If we can't, it's not worth dying over
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
51
node_modules/stream-consume/package.json
generated
vendored
51
node_modules/stream-consume/package.json
generated
vendored
@@ -1,51 +0,0 @@
|
||||
{
|
||||
"_from": "stream-consume@~0.1.0",
|
||||
"_id": "stream-consume@0.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==",
|
||||
"_location": "/stream-consume",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "stream-consume@~0.1.0",
|
||||
"name": "stream-consume",
|
||||
"escapedName": "stream-consume",
|
||||
"rawSpec": "~0.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "~0.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/orchestrator"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz",
|
||||
"_shasum": "d3bdb598c2bd0ae82b8cac7ac50b1107a7996c48",
|
||||
"_spec": "stream-consume@~0.1.0",
|
||||
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/t-latehome/wp-content/plugins/opal-estate-pro/node_modules/orchestrator",
|
||||
"author": {
|
||||
"name": "Aron Nopanen"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/aroneous/stream-consume/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Consume a stream to ensure it keeps flowing",
|
||||
"devDependencies": {
|
||||
"mocha": "^1.20.1",
|
||||
"should": "^4.0.4",
|
||||
"through2": "^0.5.1"
|
||||
},
|
||||
"homepage": "https://github.com/aroneous/stream-consume",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "stream-consume",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/aroneous/stream-consume.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.1.1"
|
||||
}
|
||||
Reference in New Issue
Block a user