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

Function [inspect]

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

Source from the content-addressed store, hash-verified

579 },
580
581 [inspect](depth, opts) {
582 validateDecoder(this);
583 if (typeof depth === 'number' && depth < 0)
584 return this;
585 const constructor = getConstructorOf(this) || TextDecoder;
586 const obj = { __proto__: { constructor } };
587 obj.encoding = this.encoding;
588 obj.fatal = this.fatal;
589 obj.ignoreBOM = this.ignoreBOM;
590 if (opts.showHidden) {
591 obj[kFlags] = this[kFlags];
592 obj[kHandle] = this[kHandle];
593 }
594 // Lazy to avoid circular dependency
595 const { inspect } = require('internal/util/inspect');
596 return `${constructor.name} ${inspect(obj)}`;
597 },
598});
599const propertiesValues = ObjectValues(sharedProperties);
600for (let i = 0; i < propertiesValues.length; i++) {

Callers

nothing calls this directly

Calls 4

validateDecoderFunction · 0.85
getConstructorOfFunction · 0.85
inspectFunction · 0.70
requireFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…