diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-04-05 22:51:49 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-04-05 23:00:02 +0200 |
commit | e37effe4cec98688e75d770f4d0b7f68927e2b73 (patch) | |
tree | e7efa0fc8a2139f9aba4b66ea3f3613262f20cef /deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md | |
parent | 026f6b787a7a23597790f1f0b076c58a68c7c38b (diff) | |
download | android-node-v8-e37effe4cec98688e75d770f4d0b7f68927e2b73.tar.gz android-node-v8-e37effe4cec98688e75d770f4d0b7f68927e2b73.tar.bz2 android-node-v8-e37effe4cec98688e75d770f4d0b7f68927e2b73.zip |
Revert "deps: upgrade npm to 5.8.0"
This reverts commit 25a816dcda7b1db0929501acfe13f2fe5119759b.
PR-URL: https://github.com/nodejs/node/pull/19837
Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md')
-rw-r--r-- | deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md b/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md deleted file mode 100644 index f53e130849..0000000000 --- a/deps/npm/node_modules/cacache/node_modules/mississippi/node_modules/parallel-transform/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# parallel-transform - -[Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) for Node.js that allows you to run your transforms -in parallel without changing the order of the output. - - npm install parallel-transform - -It is easy to use - -``` js -var transform = require('parallel-transform'); - -var stream = transform(10, function(data, callback) { // 10 is the parallism level - setTimeout(function() { - callback(null, data); - }, Math.random() * 1000); -}); - -for (var i = 0; i < 10; i++) { - stream.write(''+i); -} -stream.end(); - -stream.on('data', function(data) { - console.log(data); // prints 0,1,2,... -}); -stream.on('end', function() { - console.log('stream has ended'); -}); -``` - -If you run the above example you'll notice that it runs in parallel -(does not take ~1 second between each print) and that the order is preserved - -## Stream options - -All transforms are Node 0.10 streams. Per default they are created with the options `{objectMode:true}`. -If you want to use your own stream options pass them as the second parameter - -``` js -var stream = transform(10, {objectMode:false}, function(data, callback) { - // data is now a buffer - callback(null, data); -}); - -fs.createReadStream('filename').pipe(stream).pipe(process.stdout); -``` - -### Unordered -Passing the option `{ordered:false}` will output the data as soon as it's processed by a transform, without waiting to respect the order. - -## License - -MIT
\ No newline at end of file |