Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

cborg

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cborg - npm Package Compare versions

Comparing version
4.5.2
to
4.5.3
+2
-0
CHANGELOG.md

@@ -0,1 +1,3 @@

## [4.5.3](https://github.com/rvagg/cborg/compare/v4.5.2...v4.5.3) (2026-01-20)
## [4.5.2](https://github.com/rvagg/cborg/compare/v4.5.1...v4.5.2) (2026-01-20)

@@ -2,0 +4,0 @@

+6
-2

@@ -37,2 +37,6 @@ // Use Uint8Array directly in the browser, use Buffer in Node.js but don't

// Threshold for switching between manual utf8Slice and native TextDecoder/Buffer
// Manual decoding has overhead from array building; native is fast for strings > 32 bytes
const UTF8_THRESHOLD = 32
export const toString = useBuffer

@@ -46,3 +50,3 @@ ? // eslint-disable-line operator-linebreak

(bytes, start, end) => {
return end - start > 64
return end - start > UTF8_THRESHOLD
? // eslint-disable-line operator-linebreak

@@ -61,3 +65,3 @@ // @ts-ignore

(bytes, start, end) => {
return end - start > 64
return end - start > UTF8_THRESHOLD
? textDecoder.decode(bytes.subarray(start, end))

@@ -64,0 +68,0 @@ : utf8Slice(bytes, start, end)

{
"name": "cborg",
"version": "4.5.2",
"version": "4.5.3",
"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