Socket
Socket
Sign inDemoInstall

pino-pretty

Package Overview
Dependencies
Maintainers
4
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-pretty - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

2

index.js

@@ -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)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc