{"name":"is-stream","version":"4.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":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["stream","type","streams","writable","readable","duplex","transform","check","detect","is"],"devDependencies":{"@types/node":"^20.11.19","ava":"^5.3.1","tempy":"^3.1.0","tsd":"^0.30.5","xo":"^0.57.0"},"types":"./index.d.ts","gitHead":"29ddffc78580fea909e06b3fc2a0b2d3ba56da85","bugs":{"url":"https://github.com/sindresorhus/is-stream/issues"},"homepage":"https://github.com/sindresorhus/is-stream#readme","_id":"is-stream@4.0.0","_nodeVersion":"18.19.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-URLxBTBUl6EnwuIoR8OyYiFxL9jrmc7JzQp1W72ol8yk5c/7amjKrSlNgqU7kBiR0Wf8INMEXj+ghiClA+F62Q==","shasum":"3bd637761e6f9e9e30331744bcef71aba4c9a9f2","tarball":"http://registry-npm.ywwl.com/is-stream/download/is-stream-4.0.0.tgz","fileCount":5,"unpackedSize":7749,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICE1R2gSj5DMKxDmidSreCtXB8GkJ/XajZtZClINMPXkAiA55/OJT8/dDrHitFZOrhCQpdwY9+0wched1fa7Kuf/AA=="}],"size":2387,"noattachment":false,"key":"/is-stream/-/is-stream-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-stream_4.0.0_1708369505088_0.4158994141219907"},"_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```sh\nnpm 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, options?)\n\nReturns a `boolean` for whether it's a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).\n\n### isWritableStream(stream, options?)\n\nReturns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable), an [`http.OutgoingMessage`](https://nodejs.org/api/http.html#class-httpoutgoingmessage), an [`http.ServerResponse`](https://nodejs.org/api/http.html#class-httpserverresponse) or an [`http.ClientRequest`](https://nodejs.org/api/http.html#class-httpserverresponse).\n\n### isReadableStream(stream, options?)\n\nReturns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable) or an [`http.IncomingMessage`](https://nodejs.org/api/http.html#class-httpincomingmessage).\n\n### isDuplexStream(stream, options?)\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, options?)\n\nReturns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).\n\n### Options\n\n#### checkOpen\n\nType: `boolean`\\\nDefault: `true`\n\nWhen this option is `true`, the method returns `false` if the stream has already been closed.\n\n## Related\n\n- [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream\n","publish_time":1708369505233,"_cnpm_publish_time":1708369505233,"dist-tags":{"latest":"4.0.1"}}