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

fast-safe-stringify

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-safe-stringify - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

14

index.js

@@ -6,3 +6,3 @@ module.exports = stringify

const arr = []
var arr = []

@@ -12,3 +12,3 @@ // Regular stringify

decirc(obj, '', [], undefined)
const res = JSON.stringify(obj, replacer, spacer)
var res = JSON.stringify(obj, replacer, spacer)
while (arr.length !== 0) {

@@ -37,3 +37,3 @@ var part = arr.pop()

} else {
const keys = Object.keys(val)
var keys = Object.keys(val)
for (i = 0; i < keys.length; i++) {

@@ -60,4 +60,4 @@ var key = keys[i]

function deterministicStringify (obj, replacer, spacer) {
const tmp = deterministicDecirc(obj, '', [], undefined) || obj
const res = JSON.stringify(tmp, replacer, spacer)
var tmp = deterministicDecirc(obj, '', [], undefined) || obj
var res = JSON.stringify(tmp, replacer, spacer)
while (arr.length !== 0) {

@@ -91,4 +91,4 @@ var part = arr.pop()

// Create a temporary object in the required way
const tmp = {}
const keys = Object.keys(val).sort(compareFunction)
var tmp = {}
var keys = Object.keys(val).sort(compareFunction)
for (i = 0; i < keys.length; i++) {

@@ -95,0 +95,0 @@ var key = keys[i]

{
"name": "fast-safe-stringify",
"version": "2.0.3",
"version": "2.0.4",
"description": "Safely and quickly serialize JavaScript objects",

@@ -5,0 +5,0 @@ "keywords": [

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