pino-pretty
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -68,3 +68,3 @@ 'use strict' | ||
// Short-circuit for spec allowed primitive values. | ||
if ([null, true, false].includes(log)) { | ||
if ([null, true, false].includes(log) || Number.isFinite(log)) { | ||
return `${log}\n` | ||
@@ -71,0 +71,0 @@ } |
{ | ||
"name": "pino-pretty", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Prettifier for Pino log lines", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -137,3 +137,3 @@ <a id="intro"></a> | ||
The `colorize` default follows | ||
[`chalk.supportsColor](https://www.npmjs.com/package/chalk#chalksupportscolor). | ||
[`chalk.supportsColor`](https://www.npmjs.com/package/chalk#chalksupportscolor). | ||
@@ -140,0 +140,0 @@ <a id="license"><a> |
@@ -352,2 +352,22 @@ 'use strict' | ||
t.test('handles numbers', (t) => { | ||
const pretty = prettyFactory() | ||
let formatted = pretty(2) | ||
t.is(formatted, '2\n') | ||
formatted = pretty(-2) | ||
t.is(formatted, '-2\n') | ||
formatted = pretty(0.2) | ||
t.is(formatted, '0.2\n') | ||
formatted = pretty(Infinity) | ||
t.is(formatted, 'Infinity\n') | ||
formatted = pretty(NaN) | ||
t.is(formatted, 'NaN\n') | ||
t.end() | ||
}) | ||
t.test('handles `undefined` input', (t) => { | ||
@@ -354,0 +374,0 @@ t.plan(1) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
246842
1718