MCPcopy Create free account
hub / github.com/nodejs/node / isIterable

Function isIterable

deps/undici/src/lib/core/util.js:310–312  ·  view source on GitHub ↗

* @param {*} obj * @returns {obj is Iterable}

(obj)

Source from the content-addressed store, hash-verified

308 * @returns {obj is Iterable}
309 */
310function isIterable (obj) {
311 return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function'))
312}
313
314/**
315 * Checks whether an object has a safe Symbol.iterator — i.e. one that is

Callers 2

wrapRequestBodyFunction · 0.70
constructorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected