Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-json-stringify

Package Overview
Dependencies
Maintainers
8
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-json-stringify - npm Package Compare versions

Comparing version 5.6.0 to 5.6.1

test/fix-604.test.js

15

lib/serializer.js

@@ -53,13 +53,10 @@ 'use strict'

asNumber (i) {
if (typeof i !== 'number') {
i = Number(i)
}
// NaN !== NaN
if (i !== i) { // eslint-disable-line no-self-compare
const num = Number(i)
if (Number.isNaN(num)) {
throw new Error(`The value "${i}" cannot be converted to a number.`)
} else if (!Number.isFinite(num)) {
return null
} else {
return '' + num
}
if (i === Infinity || i === -Infinity) {
return 'null'
}
return '' + i
}

@@ -66,0 +63,0 @@

2

package.json
{
"name": "fast-json-stringify",
"version": "5.6.0",
"version": "5.6.1",
"description": "Stringify your JSON at max speed",

@@ -5,0 +5,0 @@ "main": "index.js",

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