Bakhtina Sofya b84cb877be 1st comm | 3 tygodni temu | |
---|---|---|
.. | ||
index.js | 3 tygodni temu | |
license | 3 tygodni temu | |
package.json | 3 tygodni temu | |
readme.md | 3 tygodni temu |
Check if something is a Node.js stream
$ npm install --save is-stream
const fs = require('fs');
const isStream = require('is-stream');
isStream(fs.createReadStream('unicorn.png'));
//=> true
isStream({});
//=> false
MIT © Sindre Sorhus