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

preserves

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preserves - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"name": "preserves",
"version": "0.0.5",
"version": "0.0.6",
"description": "Experimental data serialization format",

@@ -5,0 +5,0 @@ "homepage": "https://gitlab.com/tonyg/preserves",

@@ -21,3 +21,5 @@ "use strict";

options = options || {};
this.packet = packet._view || packet; // strip off Bytes wrapper, if any
this.packet = packet
? (packet._view || packet) // strip off Bytes wrapper, if any
: new Uint8Array(0);
this.index = 0;

@@ -27,2 +29,7 @@ this.shortForms = options.shortForms || {};

write(data) {
this.packet = Bytes.concat([this.packet.slice(this.index), data])._view;
this.index = 0;
}
nextbyte() {

@@ -179,2 +186,15 @@ if (this.index >= this.packet.length) throw new ShortPacket("Short packet");

}
try_next() {
const start = this.index;
try {
return this.next();
} catch (e) {
if (e instanceof ShortPacket) {
this.index = start;
return void 0;
}
throw e;
}
}
}

@@ -181,0 +201,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