diff options
author | Nevena Bojovic <nenabojov@gmail.com> | 2022-03-01 22:05:25 +0100 |
---|---|---|
committer | Nevena Bojovic <nenabojov@gmail.com> | 2022-03-01 22:05:25 +0100 |
commit | 6555fb80fdd8f6a5d201efadec3189d1244830a0 (patch) | |
tree | c1aa1c5aedc634ad1ea7fad4847884d559b51290 /sandbox/testAppNevena/Front/node_modules/minipass-collect/README.md | |
parent | 7d3640f824f46490b47bd95f1c5a16644f712068 (diff) |
Izbrisala bin, obj i node-modules.
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/minipass-collect/README.md')
-rw-r--r-- | sandbox/testAppNevena/Front/node_modules/minipass-collect/README.md | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/minipass-collect/README.md b/sandbox/testAppNevena/Front/node_modules/minipass-collect/README.md deleted file mode 100644 index ae1c3dac..00000000 --- a/sandbox/testAppNevena/Front/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. |