{"_id":"is-stream","_rev":"172374","name":"is-stream","description":"Check if something is a Node.js stream","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2022-10-18T09:10:53.000Z","created":"2015-01-18T18:59:27.432Z","3.0.0":"2021-08-10T10:52:14.251Z","2.0.1":"2021-07-26T10:51:04.495Z","2.0.0":"2019-04-20T17:02:37.870Z","1.1.0":"2016-04-12T07:41:55.666Z","1.0.1":"2015-01-19T12:39:43.945Z","1.0.0":"2015-01-18T18:59:27.432Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-stream.git"},"versions":{"3.0.0":{"name":"is-stream","version":"3.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"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["stream","type","streams","writable","readable","duplex","transform","check","detect","is"],"devDependencies":{"@types/node":"^16.4.13","ava":"^3.15.0","tempy":"^1.0.1","tsd":"^0.17.0","xo":"^0.44.0"},"gitHead":"6913e344ab2dd63041bb7c03095876ce5a7e0a8b","bugs":{"url":"https://github.com/sindresorhus/is-stream/issues"},"homepage":"https://github.com/sindresorhus/is-stream#readme","_id":"is-stream@3.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.13.0","dist":{"shasum":"e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac","size":2220,"noattachment":false,"key":"/is-stream/-/is-stream-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/is-stream/download/is-stream-3.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-stream_3.0.0_1628592734094_0.10015535082882487"},"_hasShrinkwrap":false,"publish_time":1628592734251,"_cnpm_publish_time":1628592734251},"2.0.1":{"name":"is-stream","version":"2.0.1","description":"Check if something is a Node.js stream","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-stream.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://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":"fb8caed475b4107cee3c22be3252a904020eb2d4","bugs":{"url":"https://github.com/sindresorhus/is-stream/issues"},"homepage":"https://github.com/sindresorhus/is-stream#readme","_id":"is-stream@2.0.1","_nodeVersion":"16.2.0","_npmVersion":"7.10.0","dist":{"shasum":"fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077","size":2222,"noattachment":false,"key":"/is-stream/-/is-stream-2.0.1.tgz","tarball":"http://name.csiicloud.com:7001/is-stream/download/is-stream-2.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-stream_2.0.1_1627296664370_0.3696773205895987"},"_hasShrinkwrap":false,"publish_time":1627296664495,"_cnpm_publish_time":1627296664495},"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":{"shasum":"bde9c32680d6fae04129d6ac9d921ce7815f78e3","size":2080,"noattachment":false,"key":"/is-stream/-/is-stream-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/is-stream/download/is-stream-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-stream_2.0.0_1555779757689_0.1309729016157941"},"_hasShrinkwrap":false,"publish_time":1555779757870,"_cnpm_publish_time":1555779757870},"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","size":1616,"noattachment":false,"key":"/is-stream/-/is-stream-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/is-stream/download/is-stream-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-stream-1.1.0.tgz_1460446915184_0.806101513793692"},"directories":{},"publish_time":1460446915666,"_cnpm_publish_time":1460446915666,"_hasShrinkwrap":false},"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":""}],"dist":{"shasum":"b44ce45b1f0c3df583f6b5debf84dcf9743ac8b5","size":889,"noattachment":false,"key":"/is-stream/-/is-stream-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/is-stream/download/is-stream-1.0.1.tgz"},"directories":{},"publish_time":1421671183945,"_cnpm_publish_time":1421671183945,"_hasShrinkwrap":false},"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":""}],"dist":{"shasum":"aa0ce914e0e917064222acf7ddf6140d718865d7","size":874,"noattachment":false,"key":"/is-stream/-/is-stream-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/is-stream/download/is-stream-1.0.0.tgz"},"directories":{},"publish_time":1421607567432,"_cnpm_publish_time":1421607567432,"_hasShrinkwrap":false}},"readme":"# is-stream\n\n> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html)\n\n## Install\n\n```\n$ npm install is-stream\n```\n\n## Usage\n\n```js\nimport fs from 'node:fs';\nimport {isStream} from 'is-stream';\n\nisStream(fs.createReadStream('unicorn.png'));\n//=> true\n\nisStream({});\n//=> false\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#### isWritableStream(stream)\n\nReturns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).\n\n#### isReadableStream(stream)\n\nReturns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).\n\n#### isDuplexStream(stream)\n\nReturns a `boolean` for whether it's a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).\n\n#### isTransformStream(stream)\n\nReturns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).\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\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-is-stream?utm_source=npm-is-stream&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","_attachments":{},"homepage":"https://github.com/sindresorhus/is-stream#readme","bugs":{"url":"https://github.com/sindresorhus/is-stream/issues"},"license":"MIT"}