MCPcopy Create free account
hub / github.com/TruthHun/BookStack / inspect

Function inspect

static/word2md/mammoth.browser.js:29612–29635  ·  view source on GitHub ↗
(obj, opts)

Source from the content-addressed store, hash-verified

29610 */
29611/* legacy: obj, showHidden, depth, colors*/
29612function inspect(obj, opts) {
29613 // default options
29614 var ctx = {
29615 seen: [],
29616 stylize: stylizeNoColor
29617 };
29618 // legacy...
29619 if (arguments.length >= 3) ctx.depth = arguments[2];
29620 if (arguments.length >= 4) ctx.colors = arguments[3];
29621 if (isBoolean(opts)) {
29622 // legacy...
29623 ctx.showHidden = opts;
29624 } else if (opts) {
29625 // got an "options" object
29626 exports._extend(ctx, opts);
29627 }
29628 // set default options
29629 if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
29630 if (isUndefined(ctx.depth)) ctx.depth = 2;
29631 if (isUndefined(ctx.colors)) ctx.colors = false;
29632 if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
29633 if (ctx.colors) ctx.stylize = stylizeWithColor;
29634 return formatValue(ctx, obj, ctx.depth);
29635}
29636exports.inspect = inspect;
29637
29638

Callers 1

mammoth.browser.jsFile · 0.70

Calls 3

isBooleanFunction · 0.70
isUndefinedFunction · 0.70
formatValueFunction · 0.70

Tested by

no test coverage detected