{"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":"http://registry-npm.ywwl.com/is-stream/download/is-stream-1.0.0.tgz","integrity":"sha512-rJQ9jrSmjKDMFcqluM70NLMOCJCpxHgUctFcLphRDDVFFv48wo1o3u0o3iaHdYEDbKZwL8sVZwkr2Eym1pcmng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkWep+63uvpAISi5NLmoXCZDGlogisqm1N+75bWNgHMAIgX6+uhneBB+WTjrRNJx16WJ42PDSYGg7Y+vtBrGGIlvc="}],"size":874,"noattachment":false,"key":"/is-stream/-/is-stream-1.0.0.tgz"},"directories":{},"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":1421607567432,"_cnpm_publish_time":1421607567432,"dist-tags":{"latest":"4.0.1"}}