-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
38 lines (38 loc) · 2.11 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
34
35
36
37
38
{
"name": "end-of-stream",
"version": "1.1.0",
"description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/end-of-stream.git"
},
"dependencies": {
"once": "~1.3.0"
},
"scripts": {
"test": "node test.js"
},
"keywords": [
"stream",
"streams",
"callback",
"finish",
"close",
"end",
"wait"
],
"bugs": {
"url": "https://github.com/mafintosh/end-of-stream/issues"
},
"homepage": "https://github.com/mafintosh/end-of-stream",
"main": "index.js",
"author": {
"name": "Mathias Buus",
"email": "mathiasbuus@gmail.com"
},
"license": "MIT",
"readme": "# end-of-stream\n\nA node module that calls a callback when a readable/writable/duplex stream has completed or failed.\n\n\tnpm install end-of-stream\n\n## Usage\n\nSimply pass a stream and a callback to the `eos`.\nBoth legacy streams and streams2 are supported.\n\n``` js\nvar eos = require('end-of-stream');\n\neos(readableStream, function(err) {\n\tif (err) return console.log('stream had an error or closed early');\n\tconsole.log('stream has ended');\n});\n\neos(writableStream, function(err) {\n\tif (err) return console.log('stream had an error or closed early');\n\tconsole.log('stream has finished');\n});\n\neos(duplexStream, function(err) {\n\tif (err) return console.log('stream had an error or closed early');\n\tconsole.log('stream has ended and finished');\n});\n\neos(duplexStream, {readable:false}, function(err) {\n\tif (err) return console.log('stream had an error or closed early');\n\tconsole.log('stream has ended but might still be writable');\n});\n\neos(duplexStream, {writable:false}, function(err) {\n\tif (err) return console.log('stream had an error or closed early');\n\tconsole.log('stream has ended but might still be readable');\n});\n\neos(readableStream, {error:false}, function(err) {\n\t// do not treat emit('error', err) as a end-of-stream\n});\n```\n\n## License\n\nMIT",
"readmeFilename": "README.md",
"_id": "end-of-stream@1.1.0",
"_from": "end-of-stream@>=1.0.0 <2.0.0"
}