Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "destr", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "A faster, secure and convenient alternative for JSON.parse", | ||
@@ -23,4 +23,4 @@ "repository": "unjs/destr", | ||
"scripts": { | ||
"bench:bun": "pnpm build && bun --bun ./bench.mjs", | ||
"bench:node": "pnpm build && node ./bench.mjs", | ||
"bench:bun": "pnpm build && bun --bun ./test/bench.mjs", | ||
"bench:node": "pnpm build && node ./test/bench.mjs", | ||
"build": "unbuild", | ||
@@ -35,14 +35,14 @@ "dev": "vitest dev", | ||
"@hapi/bourne": "^3.0.0", | ||
"@vitest/coverage-v8": "^0.34.6", | ||
"benchmark": "^2.1.4", | ||
"@vitest/coverage-v8": "^1.3.0", | ||
"changelogen": "^0.5.5", | ||
"eslint": "^8.52.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-unjs": "^0.2.1", | ||
"prettier": "^3.0.3", | ||
"mitata": "^0.1.11", | ||
"prettier": "^3.2.5", | ||
"secure-json-parse": "^2.7.0", | ||
"typescript": "^5.2.2", | ||
"typescript": "^5.3.3", | ||
"unbuild": "^2.0.0", | ||
"vitest": "^0.34.6" | ||
"vitest": "^1.3.0" | ||
}, | ||
"packageManager": "pnpm@8.9.2" | ||
"packageManager": "pnpm@8.15.3" | ||
} |
@@ -59,4 +59,2 @@ # destr | ||
> 🚀 Up to 500 times faster than `JSON.parse`! | ||
```js | ||
@@ -72,4 +70,2 @@ // Uncaught SyntaxError: Unexpected token u in JSON at position 0 | ||
> 🚀 Up to 900 times faster than `JSON.parse`! | ||
```js | ||
@@ -85,4 +81,2 @@ // Uncaught SyntaxError: Unexpected token T in JSON at position 0 | ||
> 🚀 Up to 900 times faster than `JSON.parse`! | ||
```js | ||
@@ -124,5 +118,5 @@ // Uncaught SyntaxError: Unexpected token s in JSON at position 0 | ||
`destr` is sometimes little bit slower than `JSON.parse` when parsing a valid JSON string mainly because of transform to avoid [prototype pollution](https://learn.snyk.io/lessons/prototype-pollution/javascript/) which can lead to serious security issues if not being sanitized. In the other words, `destr` is better when input is not always a JSON string or from untrusted source like request body. | ||
`destr` is faster generally for arbitrary inputs but also sometimes little bit slower than `JSON.parse` when parsing a valid JSON string mainly because of transform to avoid [prototype pollution](https://learn.snyk.io/lessons/prototype-pollution/javascript/) which can lead to serious security issues if not being sanitized. In the other words, `destr` is better when input is not always a JSON string or from untrusted source like request body. | ||
Check [Benchmarks](./BENCH.md) | ||
Check [Benchmark Results](./BENCH.md) or run with `pnpm run bench:node` or `pnpm run bench:bun` yourself! | ||
@@ -129,0 +123,0 @@ ## License |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
11121
133