MCPcopy
hub / github.com/nodejs/undici / isStream

Function isStream

lib/core/util.js:79–81  ·  view source on GitHub ↗

* @param {*} obj * @returns {obj is import('node:stream').Stream}

(obj)

Source from the content-addressed store, hash-verified

77 * @returns {obj is import('node:stream').Stream}
78 */
79function isStream (obj) {
80 return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'
81}
82
83/**
84 * @param {*} object

Callers 4

wrapRequestBodyFunction · 0.85
bodyLengthFunction · 0.85
destroyFunction · 0.85
constructorMethod · 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…