8 lines
230 B
JavaScript
8 lines
230 B
JavaScript
const isWritableStream = val =>
|
|
val !== null &&
|
|
typeof val === 'object' &&
|
|
typeof val.pipe === 'function' &&
|
|
typeof val._write === 'function' &&
|
|
typeof val._writableState === 'object';
|
|
module.exports = isWritableStream;
|