| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 939cf6d commit 0858e62
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -413,6 +413,10 @@ function formatValue(ctx, value, recurseTimes) { | |||
| 413 | 413 | formatted = formatPrimitiveNoColor(ctx, raw); | |
| 414 | 414 | return ctx.stylize('[String: ' + formatted + ']', 'string'); | |
| 415 | 415 | } | |
| 416 | + if (typeof raw === 'symbol') { | ||
| 417 | + formatted = formatPrimitiveNoColor(ctx, raw); | ||
| 418 | + return ctx.stylize('[Symbol: ' + formatted + ']', 'symbol'); | ||
| 419 | + } | ||
| 416 | 420 | if (typeof raw === 'number') { | |
| 417 | 421 | formatted = formatPrimitiveNoColor(ctx, raw); | |
| 418 | 422 | return ctx.stylize('[Number: ' + formatted + ']', 'number'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -474,6 +474,7 @@ test_lines({ | |||
| 474 | 474 | ||
| 475 | 475 | // test boxed primitives output the correct values | |
| 476 | 476 | assert.equal(util.inspect(new String('test')), '[String: \'test\']'); | |
| 477 | + assert.equal(util.inspect(Object(Symbol('test'))), '[Symbol: Symbol(test)]'); | ||
| 477 | 478 | assert.equal(util.inspect(new Boolean(false)), '[Boolean: false]'); | |
| 478 | 479 | assert.equal(util.inspect(new Boolean(true)), '[Boolean: true]'); | |
| 479 | 480 | assert.equal(util.inspect(new Number(0)), '[Number: 0]'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments