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

Class SafeIterator

lib/internal/per_context/primordials.js:373–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371 */
372const createSafeIterator = (factory, next) => {
373 class SafeIterator {
374 constructor(iterable) {
375 this._iterator = factory(iterable);
376 }
377 next() {
378 return next(this._iterator);
379 }
380 [SymbolIterator]() {
381 return this;
382 }
383 }
384 ObjectSetPrototypeOf(SafeIterator.prototype, null);
385 ObjectFreeze(SafeIterator.prototype);
386 ObjectFreeze(SafeIterator);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…