{ "_id": "is-stream", "_rev": "11-c2e98b5f0708cf18aa0f4cb453e8c824", "name": "is-stream", "description": "Check if something is a Node.js stream", "dist-tags": { "latest": "2.0.0" }, "versions": { "1.0.0": { "name": "is-stream", "version": "1.0.0", "description": "Check if something is a Node.js stream", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/sindresorhus/is-stream" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "node test.js" }, "files": [ "index.js" ], "keywords": [ "stream", "streams", "writable", "readable", "duplex", "check", "detect", "is", "type" ], "devDependencies": { "ava": "0.0.4", "tempfile": "^1.1.0" }, "gitHead": "a5327fd78cff686b4a9e32e676e179b620fa748b", "bugs": { "url": "https://github.com/sindresorhus/is-stream/issues" }, "homepage": "https://github.com/sindresorhus/is-stream", "_id": "is-stream@1.0.0", "_shasum": "aa0ce914e0e917064222acf7ddf6140d718865d7", "_from": ".", "_npmVersion": "1.4.28", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "dist": { "shasum": "aa0ce914e0e917064222acf7ddf6140d718865d7", "tarball": "https://registry.npmjs.org/is-stream/-/is-stream-1.0.0.tgz" }, "directories": {} }, "1.0.1": { "name": "is-stream", "version": "1.0.1", "description": "Check if something is a Node.js stream", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/sindresorhus/is-stream" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "node test.js" }, "files": [ "index.js" ], "keywords": [ "stream", "streams", "writable", "readable", "duplex", "check", "detect", "is", "type" ], "devDependencies": { "ava": "0.0.4", "tempfile": "^1.1.0" }, "gitHead": "424a6904c768f5f446fbc36c03a31be8b1209ca6", "bugs": { "url": "https://github.com/sindresorhus/is-stream/issues" }, "homepage": "https://github.com/sindresorhus/is-stream", "_id": "is-stream@1.0.1", "_shasum": "b44ce45b1f0c3df583f6b5debf84dcf9743ac8b5", "_from": ".", "_npmVersion": "1.4.28", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "dist": { "shasum": "b44ce45b1f0c3df583f6b5debf84dcf9743ac8b5", "tarball": "https://registry.npmjs.org/is-stream/-/is-stream-1.0.1.tgz" }, "directories": {} }, "1.1.0": { "name": "is-stream", "version": "1.1.0", "description": "Check if something is a Node.js stream", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/is-stream.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "stream", "type", "streams", "writable", "readable", "duplex", "transform", "check", "detect", "is" ], "devDependencies": { "ava": "*", "tempfile": "^1.1.0", "xo": "*" }, "gitHead": "e21d73f1028c189d16150cea52641059b0936310", "bugs": { "url": "https://github.com/sindresorhus/is-stream/issues" }, "homepage": "https://github.com/sindresorhus/is-stream#readme", "_id": "is-stream@1.1.0", "_shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44", "_from": ".", "_npmVersion": "2.15.0", "_nodeVersion": "4.4.2", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "shasum": "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44", "tarball": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/is-stream-1.1.0.tgz_1460446915184_0.806101513793692" }, "directories": {} }, "2.0.0": { "name": "is-stream", "version": "2.0.0", "description": "Check if something is a Node.js stream", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/is-stream.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=8" }, "scripts": { "test": "xo && ava && tsd" }, "keywords": [ "stream", "type", "streams", "writable", "readable", "duplex", "transform", "check", "detect", "is" ], "devDependencies": { "@types/node": "^11.13.6", "ava": "^1.4.1", "tempy": "^0.3.0", "tsd": "^0.7.2", "xo": "^0.24.0" }, "gitHead": "1a70a7f985a00bf25de8437e68c849bf0e434bfb", "bugs": { "url": "https://github.com/sindresorhus/is-stream/issues" }, "homepage": "https://github.com/sindresorhus/is-stream#readme", "_id": "is-stream@2.0.0", "_nodeVersion": "8.16.0", "_npmVersion": "6.9.0", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "dist": { "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "shasum": "bde9c32680d6fae04129d6ac9d921ce7815f78e3", "tarball": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "fileCount": 5, "unpackedSize": 5691, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcu1CuCRA9TVsSAnZWagAApkwP/1LBH7WhFysLIo7y37ZT\nZWM6y/PcOCxrRAAM8qFNv9VQEGVEtjJLZBJNBuqGpGIsfctYn5cViUF1ZQNQ\nL5rEzvJBy8aNzKRNmQf/itbBGRkC75NMWCZISPPM3XxgvP2o6Bnw7P2Nu0if\n75j93Hqg4GcYFQjV9rCYagSdxJEPEIDI6d8PH2Tgdwj+581X0aNx90oEu6vU\nk33vTvMbhcsuc+19W/Asr5BpHJ2foNcTLTN1QvLCKkE1sZfCQ42EEvTmp600\n875RGh8GbId9D8kpK94pulnog1ARRpkLpvJ+ONFw/16p2hoKBLHOxUoSKZY8\nK8RPCkrdC6J2JgIyh1Yhysu0biN6jT9wgwnIcJraIUEkbNHXerCBgug+Fl3I\n4sQ+2IEIoLne+t0oqwJKoQPTgsJSVdPOVzyDps94vhxX3nB+82gOWP6qquQ9\nfTAWcmkB3cRDImlq8uCd2kAtLmXZcG+AyC1pCqA3PIPrdZG+2lWOX38Geqnw\nion1Ws4jI6d+/aJ+hs/DFEeXVvKpc+9cnFbqFKYtFRutmywquZ8mVOgSl6ez\nnV282upQ8cMpU4txk7R+PDgOz0uhIa2AA+hQ9L863HDsfOwr4CgHYGxZt/AL\nkYUoaAo6MxUdkL7rjePxho1ZDTJtK26k+5Eg+iyD3xDzVyhu2HCxZNPiRWoA\npfkb\r\n=yjey\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/is-stream_2.0.0_1555779757689_0.1309729016157941" }, "_hasShrinkwrap": false } }, "readme": "# is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream)\n\n> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html)\n\n\n## Install\n\n```\n$ npm install is-stream\n```\n\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst isStream = require('is-stream');\n\nisStream(fs.createReadStream('unicorn.png'));\n//=> true\n\nisStream({});\n//=> false\n```\n\n\n## API\n\n### isStream(stream)\n\nReturns a `boolean` for whether it's a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).\n\n#### isStream.writable(stream)\n\nReturns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).\n\n#### isStream.readable(stream)\n\nReturns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).\n\n#### isStream.duplex(stream)\n\nReturns a `boolean` for whether it's a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).\n\n#### isStream.transform(stream)\n\nReturns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).\n\n\n## Related\n\n- [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "time": { "modified": "2019-04-20T17:02:40.694Z", "created": "2015-01-18T18:59:27.432Z", "1.0.0": "2015-01-18T18:59:27.432Z", "1.0.1": "2015-01-19T12:39:43.945Z", "1.1.0": "2016-04-12T07:41:55.666Z", "2.0.0": "2019-04-20T17:02:37.870Z" }, "homepage": "https://github.com/sindresorhus/is-stream#readme", "keywords": [ "stream", "type", "streams", "writable", "readable", "duplex", "transform", "check", "detect", "is" ], "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/is-stream.git" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/is-stream/issues" }, "license": "MIT", "readmeFilename": "readme.md", "users": { "waynedpj": true, "monjer": true, "rocket0191": true, "nicknaso": true, "zhenguo.zhao": true } }