Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cbor-x

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cbor-x - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

16

decode.js

@@ -104,2 +104,5 @@ "use strict"

case 0x19:
if (majorType == 7) {
return getFloat16()
}
token = dataView.getUint16(position)

@@ -528,2 +531,15 @@ position += 2

}
function getFloat16() {
let byte0 = src[position++]
let byte1 = src[position++]
let half = (byte0 << 8) + byte1
let exp = (half >> 10) & 0x1f
let mant = half & 0x3ff
let val
if (exp == 0) val = Math.exp(mant, -24)
else if (exp != 31) val = Math.exp(mant + 1024, exp - 25)
else val = mant == 0 ? Infinity : NaN
return half & 0x8000 ? -val : val
}
let glbl = typeof window == 'object' ? window : global

@@ -530,0 +546,0 @@

8

encode.js

@@ -620,10 +620,2 @@ "use strict"

let { target, position, targetView } = allocateForWrite(1)
/*if (length < 0x100) {
target[position++] = 0xc7
target[position++] = length
} else if (length < 0x10000) {
target[position++] = 0xc8
target[position++] = length >> 8
target[position++] = length & 0xff
} else {*/
target[position++] = 0xcc

@@ -630,0 +622,0 @@ encode([type, hasNodeBuffer ? Buffer.from(buffer, offset, length) :

2

package.json
{
"name": "cbor-x",
"author": "Kris Zyp",
"version": "0.3.1",
"version": "0.3.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "types": "./index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc