Comparing version 0.1.4 to 0.1.5
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.1.5](https://github.com/nuxt-contrib/destr/compare/v0.1.4...v0.1.5) (2020-05-27) | ||
### Bug Fixes | ||
* use JsonSigRx to also match numbers ([3023552](https://github.com/nuxt-contrib/destr/commit/3023552f98823699ff12382a2c4c510c34bfc60a)) | ||
### [0.1.4](https://github.com/nuxt-contrib/destr/compare/v0.1.3...v0.1.4) (2020-05-22) | ||
@@ -7,0 +14,0 @@ |
@@ -7,2 +7,3 @@ 'use strict'; | ||
var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/; | ||
var JsonSigRx = /^["{[].*|^-?[0-9][0-9.]+$/; | ||
@@ -48,3 +49,3 @@ function jsonParseTransform(key, value) { | ||
if (val[0] !== '"' && val[0] !== '{' && val[0] !== '[') { | ||
if (!JsonSigRx.test(val)) { | ||
return val; | ||
@@ -51,0 +52,0 @@ } |
{ | ||
"name": "destr", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "A faster, secure and convenient alternative for JSON.parse", | ||
@@ -5,0 +5,0 @@ "repository": "nuxt-contrib/destr", |
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
7363
49