-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
33 lines (33 loc) · 2.3 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"name": "ordered-read-streams",
"version": "0.0.8",
"description": "Combines array of streams into one read stream in strict order",
"main": "index.js",
"scripts": {
"test": "jshint *.js test/*.js && mocha -R spec"
},
"repository": {
"type": "git",
"url": "git://github.com/armed/ordered-read-streams.git"
},
"author": {
"name": "Artem Medeusheyev",
"email": "artem.medeusheyev@gmail.com"
},
"license": "MIT",
"devDependencies": {
"should": "~3.0.1",
"mocha": "~1.17.0",
"through2": "~0.4.0",
"jshint": "~2.4.1",
"pre-commit": "0.0.4"
},
"readme": "# ordered-read-streams [![NPM version](https://badge.fury.io/js/ordered-read-streams.png)](http://badge.fury.io/js/ordered-read-streams) [![Build Status](https://travis-ci.org/armed/ordered-read-streams.png?branch=master)](https://travis-ci.org/armed/ordered-read-streams)\n\nCombines array of streams into one read stream in strict order.\n\n## Installation\n\n`npm install ordered-read-streams`\n\n## Overview\n\n`ordered-read-streams` handles all data/errors from input streams in parallel, but emits data/errors in strict order in which streams are passed to constructor. This is `objectMode = true` stream.\n\n## Example\n\n```js\nvar through = require('through2');\nvar Ordered = require('ordered-read-streams');\n\nvar s1 = through.obj(function (data, enc, next) {\n var self = this;\n setTimeout(function () {\n self.push(data);\n next();\n }, 200)\n});\nvar s2 = through.obj(function (data, enc, next) {\n var self = this;\n setTimeout(function () {\n self.push(data);\n next();\n }, 30)\n});\nvar s3 = through.obj(function (data, enc, next) {\n var self = this;\n setTimeout(function () {\n self.push(data);\n next();\n }, 100)\n});\n\nvar streams = new Ordered([s1, s2, s3]);\nstreams.on('data', function (data) {\n console.log(data);\n})\n\ns1.write('stream 1');\ns1.end();\n\ns2.write('stream 2');\ns2.end();\n\ns3.write('stream 3');\ns3.end();\n```\nOuput will be:\n\n```\nstream 1\nstream 2\nstream 3\n```\n\n## Licence\n\nMIT\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/armed/ordered-read-streams/issues"
},
"homepage": "https://github.com/armed/ordered-read-streams",
"_id": "ordered-read-streams@0.0.8",
"_from": "ordered-read-streams@0.0.8"
}