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

Function isWebStream

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

Source from the content-addressed store, hash-verified

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);
150
151const isAsyncIterableObject = value => isObject(value) && typeof value[Symbol.asyncIterator] === 'function';

Callers 1

getStdioItemTypeFunction · 0.85

Calls 2

isReadableStreamFunction · 0.85
isWritableStreamFunction · 0.85

Tested by

no test coverage detected