+2
-0
@@ -0,1 +1,3 @@ | ||
| ## [4.5.2](https://github.com/rvagg/cborg/compare/v4.5.1...v4.5.2) (2026-01-20) | ||
| ## [4.5.1](https://github.com/rvagg/cborg/compare/v4.5.0...v4.5.1) (2026-01-20) | ||
@@ -2,0 +4,0 @@ |
+4
-3
@@ -95,2 +95,3 @@ import { decodeErrPrefix } from './common.js' | ||
| const useMaps = options.useMaps === true | ||
| const rejectDuplicateMapKeys = options.rejectDuplicateMapKeys === true | ||
| const obj = useMaps ? undefined : {} | ||
@@ -110,8 +111,8 @@ const m = useMaps ? new Map() : undefined | ||
| } | ||
| if (useMaps !== true && typeof key !== 'string') { | ||
| if (!useMaps && typeof key !== 'string') { | ||
| throw new Error(`${decodeErrPrefix} non-string keys not supported (got ${typeof key})`) | ||
| } | ||
| if (options.rejectDuplicateMapKeys === true) { | ||
| if (rejectDuplicateMapKeys) { | ||
| // @ts-ignore | ||
| if ((useMaps && m.has(key)) || (!useMaps && (key in obj))) { | ||
| if ((useMaps && m.has(key)) || (!useMaps && Object.hasOwn(obj, key))) { | ||
| throw new Error(`${decodeErrPrefix} found repeat map key "${key}"`) | ||
@@ -118,0 +119,0 @@ } |
+1
-1
| { | ||
| "name": "cborg", | ||
| "version": "4.5.1", | ||
| "version": "4.5.2", | ||
| "description": "Fast CBOR with a focus on strictness", | ||
@@ -5,0 +5,0 @@ "main": "cborg.js", |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
428820
0.03%9499
0.01%