MCPcopy Index your code
hub / github.com/nodejs/node / isNodeStream

Function isNodeStream

lib/internal/streams/utils.js:68–78  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

66}
67
68function isNodeStream(obj) {
69 return (
70 obj &&
71 (
72 obj._readableState ||
73 obj._writableState ||
74 (typeof obj.write === 'function' && typeof obj.on === 'function') ||
75 (typeof obj.pipe === 'function' && typeof obj.on === 'function')
76 )
77 );
78}
79
80function isReadableStream(obj) {
81 return !!(

Callers 15

styleTextFunction · 0.85
isReadableStreamFunction · 0.85
isWritableStreamFunction · 0.85
isTransformStreamFunction · 0.85
isDestroyedFunction · 0.85
isFinishedFunction · 0.85
isWritableErroredFunction · 0.85
isReadableErroredFunction · 0.85
isClosedFunction · 0.85
willEmitCloseFunction · 0.85
pipelineImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…