MCPcopy Index your code
hub / github.com/nodejs/node / [inspect]

Method [inspect]

lib/internal/encoding.js:372–383  ·  view source on GitHub ↗
(depth, opts)

Source from the content-addressed store, hash-verified

370 }
371
372 [inspect](depth, opts) {
373 if (typeof depth === 'number' && depth < 0)
374 return this;
375 const ctor = getConstructorOf(this);
376 const obj = { __proto__: {
377 constructor: ctor === null ? TextEncoder : ctor,
378 } };
379 obj.encoding = this.#encoding;
380 // Lazy to avoid circular dependency
381 lazyInspect ??= require('internal/util/inspect').inspect;
382 return lazyInspect(obj, opts);
383 }
384}
385
386ObjectDefineProperties(

Callers

nothing calls this directly

Calls 2

getConstructorOfFunction · 0.85
requireFunction · 0.50

Tested by

no test coverage detected