diff options
author | 2020-11-18 23:26:45 +0100 | |
---|---|---|
committer | 2020-11-18 23:26:45 +0100 | |
commit | 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch) | |
tree | 8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/minipass-collect | |
parent | 1870f3fdf43707a15fda0f609a021f516f45eb63 (diff) | |
download | website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2 website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip |
rm node_modules
Diffstat (limited to 'node_modules/minipass-collect')
-rw-r--r-- | node_modules/minipass-collect/LICENSE | 15 | ||||
-rw-r--r-- | node_modules/minipass-collect/README.md | 48 | ||||
-rw-r--r-- | node_modules/minipass-collect/index.js | 71 | ||||
-rw-r--r-- | node_modules/minipass-collect/package.json | 58 |
4 files changed, 0 insertions, 192 deletions
diff --git a/node_modules/minipass-collect/LICENSE b/node_modules/minipass-collect/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/minipass-collect/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/minipass-collect/README.md b/node_modules/minipass-collect/README.md deleted file mode 100644 index ae1c3da..0000000 --- a/node_modules/minipass-collect/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# minipass-collect - -A Minipass stream that collects all the data into a single chunk - -Note that this buffers ALL data written to it, so it's only good for -situations where you are sure the entire stream fits in memory. - -Note: this is primarily useful for the `Collect.PassThrough` class, since -Minipass streams already have a `.collect()` method which returns a promise -that resolves to the array of chunks, and a `.concat()` method that returns -the data concatenated into a single Buffer or String. - -## USAGE - -```js -const Collect = require('minipass-collect') - -const collector = new Collect() -collector.on('data', allTheData => { - console.log('all the data!', allTheData) -}) - -someSourceOfData.pipe(collector) - -// note that you can also simply do: -someSourceOfData.pipe(new Minipass()).concat().then(data => ...) -// or even, if someSourceOfData is a Minipass: -someSourceOfData.concat().then(data => ...) -// but you might prefer to have it stream-shaped rather than -// Promise-shaped in some scenarios. -``` - -If you want to collect the data, but _also_ act as a passthrough stream, -then use `Collect.PassThrough` instead (for example to memoize streaming -responses), and listen on the `collect` event. - -```js -const Collect = require('minipass-collect') - -const collector = new Collect.PassThrough() -collector.on('collect', allTheData => { - console.log('all the data!', allTheData) -}) - -someSourceOfData.pipe(collector).pipe(someOtherStream) -``` - -All [minipass options](http://npm.im/minipass) are supported. diff --git a/node_modules/minipass-collect/index.js b/node_modules/minipass-collect/index.js deleted file mode 100644 index 2fe68c0..0000000 --- a/node_modules/minipass-collect/index.js +++ /dev/null @@ -1,71 +0,0 @@ -const Minipass = require('minipass') -const _data = Symbol('_data') -const _length = Symbol('_length') -class Collect extends Minipass { - constructor (options) { - super(options) - this[_data] = [] - this[_length] = 0 - } - write (chunk, encoding, cb) { - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - - if (!encoding) - encoding = 'utf8' - - const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding) - this[_data].push(c) - this[_length] += c.length - if (cb) - cb() - return true - } - end (chunk, encoding, cb) { - if (typeof chunk === 'function') - cb = chunk, chunk = null - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - if (chunk) - this.write(chunk, encoding) - const result = Buffer.concat(this[_data], this[_length]) - super.write(result) - return super.end(cb) - } -} -module.exports = Collect - -// it would be possible to DRY this a bit by doing something like -// this.collector = new Collect() and listening on its data event, -// but it's not much code, and we may as well save the extra obj -class CollectPassThrough extends Minipass { - constructor (options) { - super(options) - this[_data] = [] - this[_length] = 0 - } - write (chunk, encoding, cb) { - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - - if (!encoding) - encoding = 'utf8' - - const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding) - this[_data].push(c) - this[_length] += c.length - return super.write(chunk, encoding, cb) - } - end (chunk, encoding, cb) { - if (typeof chunk === 'function') - cb = chunk, chunk = null - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - if (chunk) - this.write(chunk, encoding) - const result = Buffer.concat(this[_data], this[_length]) - this.emit('collect', result) - return super.end(cb) - } -} -module.exports.PassThrough = CollectPassThrough diff --git a/node_modules/minipass-collect/package.json b/node_modules/minipass-collect/package.json deleted file mode 100644 index a33a363..0000000 --- a/node_modules/minipass-collect/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "minipass-collect@^1.0.2", - "_id": "minipass-collect@1.0.2", - "_inBundle": false, - "_integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "_location": "/minipass-collect", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minipass-collect@^1.0.2", - "name": "minipass-collect", - "escapedName": "minipass-collect", - "rawSpec": "^1.0.2", - "saveSpec": null, - "fetchSpec": "^1.0.2" - }, - "_requiredBy": [ - "/cacache" - ], - "_resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "_shasum": "22b813bf745dc6edba2576b940022ad6edc8c617", - "_spec": "minipass-collect@^1.0.2", - "_where": "/home/pruss/Dev/3-minute-website/node_modules/cacache", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "https://izs.me" - }, - "bundleDependencies": false, - "dependencies": { - "minipass": "^3.0.0" - }, - "deprecated": false, - "description": "A Minipass stream that collects all the data into a single chunk", - "devDependencies": { - "tap": "^14.6.9" - }, - "engines": { - "node": ">= 8" - }, - "files": [ - "index.js" - ], - "license": "ISC", - "name": "minipass-collect", - "scripts": { - "postpublish": "git push origin --follow-tags", - "postversion": "npm publish", - "preversion": "npm test", - "snap": "tap", - "test": "tap" - }, - "tap": { - "check-coverage": true - }, - "version": "1.0.2" -} |