diff options
| author | Priyansh <[email protected]> | 2020-12-22 17:50:12 +0530 |
|---|---|---|
| committer | Priyansh <[email protected]> | 2020-12-22 17:50:12 +0530 |
| commit | 22dc033f4938d6a19e086a1cbd36ec5cade5eaab (patch) | |
| tree | 9feb963ccd5c1581e676e41004801abc67db3357 /node_modules/clone-response | |
| parent | e93da8b04da86773247aadb1cbb1912e4f4526b2 (diff) | |
| download | styx-22dc033f4938d6a19e086a1cbd36ec5cade5eaab.tar.xz styx-22dc033f4938d6a19e086a1cbd36ec5cade5eaab.zip | |
Remove node_modules
Diffstat (limited to 'node_modules/clone-response')
| -rw-r--r-- | node_modules/clone-response/LICENSE | 21 | ||||
| -rw-r--r-- | node_modules/clone-response/README.md | 62 | ||||
| -rw-r--r-- | node_modules/clone-response/package.json | 73 | ||||
| -rw-r--r-- | node_modules/clone-response/src/index.js | 17 |
4 files changed, 0 insertions, 173 deletions
diff --git a/node_modules/clone-response/LICENSE b/node_modules/clone-response/LICENSE deleted file mode 100644 index f27ee9b..0000000 --- a/node_modules/clone-response/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Luke Childs - -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. diff --git a/node_modules/clone-response/README.md b/node_modules/clone-response/README.md deleted file mode 100644 index d037cfe..0000000 --- a/node_modules/clone-response/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# clone-response - -> Clone a Node.js HTTP response stream - -[](https://travis-ci.org/lukechilds/clone-response) -[](https://coveralls.io/github/lukechilds/clone-response?branch=master) -[](https://www.npmjs.com/package/clone-response) -[](https://www.npmjs.com/package/clone-response) - -Returns a new stream and copies over all properties and methods from the original response giving you a complete duplicate. - -This is useful in situations where you need to consume the response stream but also want to pass an unconsumed stream somewhere else to be consumed later. - -## Install - -```shell -npm install --save clone-response -``` - -## Usage - -```js -const http = require('http'); -const cloneResponse = require('clone-response'); - -http.get('http://example.com', response => { - const clonedResponse = cloneResponse(response); - response.pipe(process.stdout); - - setImmediate(() => { - // The response stream has already been consumed by the time this executes, - // however the cloned response stream is still available. - doSomethingWithResponse(clonedResponse); - }); -}); -``` - -Please bear in mind that the process of cloning a stream consumes it. However, you can consume a stream multiple times in the same tick, therefore allowing you to create multiple clones. e.g: - -```js -const clone1 = cloneResponse(response); -const clone2 = cloneResponse(response); -// response can still be consumed in this tick but cannot be consumed if passed -// into any async callbacks. clone1 and clone2 can be passed around and be -// consumed in the future. -``` - -## API - -### cloneResponse(response) - -Returns a clone of the passed in response. - -#### response - -Type: `stream` - -A [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) to clone. - -## License - -MIT © Luke Childs diff --git a/node_modules/clone-response/package.json b/node_modules/clone-response/package.json deleted file mode 100644 index 2be7a09..0000000 --- a/node_modules/clone-response/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "clone-response@^1.0.2", - "_id": "[email protected]", - "_inBundle": false, - "_integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "_location": "/clone-response", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "clone-response@^1.0.2", - "name": "clone-response", - "escapedName": "clone-response", - "rawSpec": "^1.0.2", - "saveSpec": null, - "fetchSpec": "^1.0.2" - }, - "_requiredBy": [ - "/cacheable-request" - ], - "_resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "_shasum": "d1dc973920314df67fbeb94223b4ee350239e96b", - "_spec": "clone-response@^1.0.2", - "_where": "/Users/lucifer/Documents/styx/node_modules/cacheable-request", - "author": { - "name": "Luke Childs", - "email": "[email protected]", - "url": "http://lukechilds.co.uk" - }, - "bugs": { - "url": "https://github.com/lukechilds/clone-response/issues" - }, - "bundleDependencies": false, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "deprecated": false, - "description": "Clone a Node.js HTTP response stream", - "devDependencies": { - "ava": "^0.22.0", - "coveralls": "^2.13.1", - "create-test-server": "^2.0.1", - "eslint-config-xo-lukechilds": "^1.0.0", - "get-stream": "^3.0.0", - "nyc": "^11.0.2", - "pify": "^3.0.0", - "xo": "^0.19.0" - }, - "homepage": "https://github.com/lukechilds/clone-response", - "keywords": [ - "clone", - "duplicate", - "copy", - "response", - "HTTP", - "stream" - ], - "license": "MIT", - "main": "src/index.js", - "name": "clone-response", - "repository": { - "type": "git", - "url": "git+https://github.com/lukechilds/clone-response.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && nyc ava" - }, - "version": "1.0.2", - "xo": { - "extends": "xo-lukechilds" - } -} diff --git a/node_modules/clone-response/src/index.js b/node_modules/clone-response/src/index.js deleted file mode 100644 index 0285dff..0000000 --- a/node_modules/clone-response/src/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -const PassThrough = require('stream').PassThrough; -const mimicResponse = require('mimic-response'); - -const cloneResponse = response => { - if (!(response && response.pipe)) { - throw new TypeError('Parameter `response` must be a response stream.'); - } - - const clone = new PassThrough(); - mimicResponse(response, clone); - - return response.pipe(clone); -}; - -module.exports = cloneResponse; |
