UNPKG

pnpm

Version:

Fast, disk space efficient package manager

104 lines (103 loc) 4.32 kB
{ "_args": [ [ { "raw": "end-of-stream@^1.1.0", "scope": null, "escapedName": "end-of-stream", "name": "end-of-stream", "rawSpec": "^1.1.0", "spec": ">=1.1.0 <2.0.0", "type": "range" }, "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/pump" ] ], "_from": "end-of-stream@>=1.1.0 <2.0.0", "_id": "end-of-stream@1.4.1", "_inCache": true, "_location": "/end-of-stream", "_nodeVersion": "8.9.3", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/end-of-stream-1.4.1.tgz_1515600688004_0.3708031203132123" }, "_npmUser": { "name": "mafintosh", "email": "mathiasbuus@gmail.com" }, "_npmVersion": "5.5.1", "_phantomChildren": {}, "_requested": { "raw": "end-of-stream@^1.1.0", "scope": null, "escapedName": "end-of-stream", "name": "end-of-stream", "rawSpec": "^1.1.0", "spec": ">=1.1.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/duplexify", "/pump", "/pumpify/pump", "/tar-stream" ], "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "_shasum": "ed29634d19baba463b6ce6b80a37213eab71ec43", "_shrinkwrap": null, "_spec": "end-of-stream@^1.1.0", "_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/pump", "author": { "name": "Mathias Buus", "email": "mathiasbuus@gmail.com" }, "bugs": { "url": "https://github.com/mafintosh/end-of-stream/issues" }, "dependencies": { "once": "^1.4.0" }, "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", "devDependencies": {}, "directories": {}, "dist": { "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "shasum": "ed29634d19baba463b6ce6b80a37213eab71ec43", "tarball": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz" }, "files": [ "index.js" ], "gitHead": "8a49159ed2661ee8ddb393c2503aee489f9ae271", "homepage": "https://github.com/mafintosh/end-of-stream", "keywords": [ "stream", "streams", "callback", "finish", "close", "end", "wait" ], "license": "MIT", "main": "index.js", "maintainers": [ { "name": "mafintosh", "email": "mathiasbuus@gmail.com" } ], "name": "end-of-stream", "optionalDependencies": {}, "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, streams2 and stream3 are supported.\n\n``` js\nvar eos = require('end-of-stream');\n\neos(readableStream, function(err) {\n // this will be set to the stream instance\n\tif (err) return console.log('stream had an error or closed early');\n\tconsole.log('stream has ended', this === readableStream);\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', this === writableStream);\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', this === duplexStream);\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 finished but might still be readable');\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 writable');\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\n\n## Related\n\n`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/mafintosh/end-of-stream.git" }, "scripts": { "test": "node test.js" }, "version": "1.4.1" }