christian 4571a14169 android fix | пре 3 година | |
---|---|---|
.. | ||
index.d.ts | пре 3 година | |
index.js | пре 3 година | |
license | пре 3 година | |
package.json | пре 3 година | |
readme.md | пре 3 година |
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
.
MIT © Sindre Sorhus