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

cbor2

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cbor2 - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

2

lib/version.d.ts

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

declare const version = "1.8.0";
declare const version = "1.8.1";
export { version };

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

const o="1.8.0";export{o as version};
const o="1.8.1";export{o as version};
{
"name": "cbor2",
"version": "1.8.0",
"version": "1.8.1",
"description": "Encode and parse data in the Concise Binary Object Representation (CBOR) data format (RFC8949).",

@@ -5,0 +5,0 @@ "exports": {

@@ -38,3 +38,3 @@ # cbor2

```js
import {decode, diagnose, encode} from 'cbor';
import {decode, diagnose, encode} from 'cbor2';

@@ -163,10 +163,11 @@ const encoded = encode(true); // Returns Uint8Array(1) [ 245 ]

```js
import {Buffer} from 'node:buffer';
import {registerEncoder} from 'cbor2/encoder';
class Bar {
constructor() {
this.three = 3;
}
}
registerEncoder(Bar, (b, _writer, _options) => [NaN, b.three]);
registerEncoder(Buffer, b => [
// Don't write a tag
NaN,
// New view on the ArrayBuffer, without copying bytes
new Uint8Array(b.buffer, b.byteOffset, b.byteLength),
]);
```

@@ -173,0 +174,0 @@

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