| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b630be2 commit f7796f2
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -314,6 +314,10 @@ function formatValue(ctx, value, recurseTimes) { | |||
| 314 | 314 | formatted = formatPrimitiveNoColor(ctx, raw); | |
| 315 | 315 | return ctx.stylize('[String: ' + formatted + ']', 'string'); | |
| 316 | 316 | } | |
| 317 | + if (typeof raw === 'symbol') { | ||
| 318 | + formatted = formatPrimitiveNoColor(ctx, raw); | ||
| 319 | + return ctx.stylize('[Symbol: ' + formatted + ']', 'symbol'); | ||
| 320 | + } | ||
| 317 | 321 | if (typeof raw === 'number') { | |
| 318 | 322 | formatted = formatPrimitiveNoColor(ctx, raw); | |
| 319 | 323 | return ctx.stylize('[Number: ' + formatted + ']', 'number'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -333,6 +333,7 @@ test_lines({ | |||
| 333 | 333 | ||
| 334 | 334 | // test boxed primitives output the correct values | |
| 335 | 335 | assert.equal(util.inspect(new String('test')), '[String: \'test\']'); | |
| 336 | + assert.equal(util.inspect(Object(Symbol('test'))), '[Symbol: Symbol(test)]'); | ||
| 336 | 337 | assert.equal(util.inspect(new Boolean(false)), '[Boolean: false]'); | |
| 337 | 338 | assert.equal(util.inspect(new Boolean(true)), '[Boolean: true]'); | |
| 338 | 339 | assert.equal(util.inspect(new Number(0)), '[Number: 0]'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments