peach a19a732be8 commit message | 2 years ago | |
---|---|---|
.. | ||
index.d.ts | 2 years ago | |
index.js | 2 years ago | |
license | 2 years ago | |
package.json | 2 years ago | |
readme.md | 2 years ago |
Check if something is a Node.js stream
$ npm install is-stream
const fs = require('fs');
const isStream = require('is-stream');
isStream(fs.createReadStream('unicorn.png'));
//=> true
isStream({});
//=> false
Returns a boolean
for whether it's a Stream
.
Returns a boolean
for whether it's a stream.Writable
.
Returns a boolean
for whether it's a stream.Readable
.
Returns a boolean
for whether it's a stream.Duplex
.
Returns a boolean
for whether it's a stream.Transform
.