| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e182ca9 commit 561c268
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -411,11 +411,15 @@ Console.prototype.table = function(tabularData, properties) { | |||
| 411 | 411 | const final = (k, v) => this.log(cliTable(k, v)); | |
| 412 | 412 | ||
| 413 | 413 | const inspect = (v) => { | |
| 414 | - const opt = { depth: 0, maxArrayLength: 3 }; | ||
| 415 | - if (v !== null && typeof v === 'object' && | ||
| 416 | - !isArray(v) && ObjectKeys(v).length > 2) | ||
| 417 | - opt.depth = -1; | ||
| 418 | - Object.assign(opt, this[kGetInspectOptions](this._stdout)); | ||
| 414 | + const depth = v !== null && | ||
| 415 | + typeof v === 'object' && | ||
| 416 | + !isArray(v) && | ||
| 417 | + ObjectKeys(v).length > 2 ? -1 : 0; | ||
| 418 | + const opt = { | ||
| 419 | + depth, | ||
| 420 | + maxArrayLength: 3, | ||
| 421 | + ...this[kGetInspectOptions](this._stdout) | ||
| 422 | + }; | ||
| 419 | 423 | return util.inspect(v, opt); | |
| 420 | 424 | }; | |
| 421 | 425 | const getIndexArray = (length) => ArrayFrom({ length }, (_, i) => inspect(i)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments