fast-json-stringify
Advanced tools
Comparing version 5.15.0 to 5.15.1
@@ -352,3 +352,4 @@ 'use strict' | ||
if (!propertiesKeys.includes(key)) { | ||
code += `if (obj['${key}'] === undefined) throw new Error('"${key}" is required!')\n` | ||
const sanitizedKey = JSON.stringify(key) | ||
code += `if (obj[${sanitizedKey}] === undefined) throw new Error('${sanitizedKey.replace(/'/g, '\\\'')} is required!')\n` | ||
} | ||
@@ -391,3 +392,3 @@ } | ||
code += ` else { | ||
throw new Error('${sanitizedKey} is required!') | ||
throw new Error('${sanitizedKey.replace(/'/g, '\\\'')} is required!') | ||
} | ||
@@ -394,0 +395,0 @@ ` |
{ | ||
"name": "fast-json-stringify", | ||
"version": "5.15.0", | ||
"version": "5.15.1", | ||
"description": "Stringify your JSON at max speed", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
365886
82
13738