fast-json-stringify
Advanced tools
Comparing version 1.5.3 to 1.5.4
@@ -210,2 +210,3 @@ 'use strict' | ||
var last = 0 | ||
var found = false | ||
var l = str.length | ||
@@ -218,5 +219,7 @@ var point = 255 | ||
last = i | ||
found = true | ||
} | ||
} | ||
if (last === 0) { | ||
if (!found) { | ||
result = str | ||
@@ -223,0 +226,0 @@ } else { |
{ | ||
"name": "fast-json-stringify", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"description": "Stringify your JSON at max speed", | ||
@@ -34,3 +34,3 @@ "main": "index.js", | ||
"standard": "^11.0.1", | ||
"tap": "^11.1.5", | ||
"tap": "^12.0.0", | ||
"uglify-es": "^3.3.9" | ||
@@ -37,0 +37,0 @@ }, |
@@ -331,1 +331,17 @@ 'use strict' | ||
}) | ||
test('render a single quote as JSON', (t) => { | ||
t.plan(2) | ||
const schema = { | ||
type: 'string' | ||
} | ||
const toStringify = '" double quote' | ||
const validate = validator(schema) | ||
const stringify = build(schema) | ||
const output = stringify(toStringify) | ||
t.equal(output, JSON.stringify(toStringify)) | ||
t.ok(validate(JSON.parse(output)), 'valid schema') | ||
}) |
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
90902
3400