MCPcopy Create free account
hub / github.com/sindresorhus/execa / isReadableStream

Function isReadableStream

lib/stdio/type.js:146–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144const KNOWN_STDIO_STRINGS = new Set(['ipc', 'ignore', 'inherit', 'overlapped', 'pipe']);
145
146const isReadableStream = value => Object.prototype.toString.call(value) === '[object ReadableStream]';
147export const isWritableStream = value => Object.prototype.toString.call(value) === '[object WritableStream]';
148const isWebStream = value => isReadableStream(value) || isWritableStream(value);
149const isTransformStream = value => isReadableStream(value?.readable) && isWritableStream(value?.writable);

Callers 3

getInputTypeFunction · 0.85
isWebStreamFunction · 0.85
isTransformStreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected