+2
-0
@@ -0,1 +1,3 @@ | ||
| ## [4.5.6](https://github.com/rvagg/cborg/compare/v4.5.5...v4.5.6) (2026-01-21) | ||
| ## [4.5.5](https://github.com/rvagg/cborg/compare/v4.5.4...v4.5.5) (2026-01-20) | ||
@@ -2,0 +4,0 @@ |
+2
-2
| import { Token, Type } from './token.js' | ||
| import { assertEnoughData, decodeErrPrefix } from './common.js' | ||
| import * as uint from './0uint.js' | ||
| import { compare, fromString, slice } from './byte-utils.js' | ||
| import { compare, fromString } from './byte-utils.js' | ||
@@ -20,3 +20,3 @@ /** | ||
| assertEnoughData(data, pos, prefix + length) | ||
| const buf = slice(data, pos + prefix, pos + prefix + length) | ||
| const buf = data.slice(pos + prefix, pos + prefix + length) | ||
| return new Token(Type.bytes, buf, prefix + length) | ||
@@ -23,0 +23,0 @@ } |
+1
-2
@@ -5,3 +5,2 @@ import { Token, Type } from './token.js' | ||
| import { encodeBytes } from './2bytes.js' | ||
| import { slice } from './byte-utils.js' | ||
@@ -56,3 +55,3 @@ const textDecoder = new TextDecoder() | ||
| if (options.retainStringBytes === true) { | ||
| tok.byteValue = slice(data, pos + prefix, pos + totLength) | ||
| tok.byteValue = data.slice(pos + prefix, pos + totLength) | ||
| } | ||
@@ -59,0 +58,0 @@ return tok |
+4
-1
| import { decodeErrPrefix } from './common.js' | ||
| import { Type } from './token.js' | ||
| import { jump, quick } from './jump.js' | ||
| import { asU8A } from './byte-utils.js' | ||
@@ -186,3 +187,5 @@ /** | ||
| options = Object.assign({}, defaultDecodeOptions, options) | ||
| const tokeniser = options.tokenizer || new Tokeniser(data, options) | ||
| // Convert Buffer to plain Uint8Array for faster slicing in decode path | ||
| const u8aData = asU8A(data) | ||
| const tokeniser = options.tokenizer || new Tokeniser(u8aData, options) | ||
| const decoded = tokensToObject(tokeniser, options) | ||
@@ -189,0 +192,0 @@ if (decoded === DONE) { |
+1
-1
| { | ||
| "name": "cborg", | ||
| "version": "4.5.5", | ||
| "version": "4.5.6", | ||
| "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
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
432148
0.04%9567
0.02%