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

Function _inspect

lib/internal/console/constructor.js:564–576  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

562 const final = (k, v) => this.log(cliTable(k, v));
563
564 const _inspect = (v) => {
565 const depth = v !== null &&
566 typeof v === 'object' &&
567 !isArray(v) &&
568 ObjectKeys(v).length > 2 ? -1 : 0;
569 const opt = {
570 depth,
571 maxArrayLength: 3,
572 breakLength: Infinity,
573 ...this[kGetInspectOptions](this._stdout),
574 };
575 return inspect(v, opt);
576 };
577 const getIndexArray = (length) => ArrayFrom(
578 { length }, (_, i) => _inspect(i));
579

Callers 2

getIndexArrayFunction · 0.85
tableFunction · 0.85

Calls 2

isArrayFunction · 0.70
inspectFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…