fast-safe-stringify
Advanced tools
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": [ |
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
26374