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

Function isSyncIterable

lib/internal/streams/iter/from.js:71–76  ·  view source on GitHub ↗

* Check if value is a sync iterable (has Symbol.iterator). * @returns {boolean}

(value)

Source from the content-addressed store, hash-verified

69 * @returns {boolean}
70 */
71function isSyncIterable(value) {
72 // We do not consider regular strings to be sync iterables in this context.
73 // We don't care about boxed strings (String objects) since they are uncommon.
74 return typeof value !== 'string' &&
75 typeof value?.[SymbolIterator] === 'function';
76}
77
78/**
79 * Check if value is an async iterable (has Symbol.asyncIterator).

Callers 15

#pullFromSourceMethod · 0.70
fromFunction · 0.70
fromSyncFunction · 0.70
isMergeOptionsFunction · 0.70
fromFunction · 0.70
pumpFunction · 0.70
normalizeSyncValueFunction · 0.70
normalizeAsyncValueFunction · 0.70
normalizeAsyncSourceFunction · 0.70
fromSyncFunction · 0.70
fromFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…