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

@helios-lang/codec-utils

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@helios-lang/codec-utils - npm Package Compare versions

Comparing version 0.1.15 to 0.1.16

2

package.json
{
"name": "@helios-lang/codec-utils",
"version": "0.1.15",
"version": "0.1.16",
"description": "Primitive manipulation functions commonly used in encoding and decoding algorithms",

@@ -5,0 +5,0 @@ "main": "src/index.js",

export class ByteStream {
/**
* @param {number[] | Uint8Array | ByteStream} bytes
* @param {number[] | string | Uint8Array | ByteStream} bytes
* @returns {ByteStream}
*/
static from(bytes: number[] | Uint8Array | ByteStream): ByteStream;
static from(bytes: number[] | string | Uint8Array | ByteStream): ByteStream;
/**
* Not intended for external use
* @param {number[] | Uint8Array} bytes
* @param {number[] | string | Uint8Array} bytes
* @param {number} pos
*/
constructor(bytes: number[] | Uint8Array, pos?: number);
constructor(bytes: number[] | string | Uint8Array, pos?: number);
/**

@@ -14,0 +14,0 @@ * Copy ByteStream so mutations doesn't change original ByteStream

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

import { hexToBytes } from "./base16.js"
export class ByteStream {

@@ -14,3 +16,3 @@ /**

* Not intended for external use
* @param {number[] | Uint8Array} bytes
* @param {number[] | string | Uint8Array} bytes
* @param {number} pos

@@ -21,2 +23,4 @@ */

this.#bytes = bytes
} else if (typeof bytes == "string") {
this.#bytes = Uint8Array.from(hexToBytes(bytes))
} else {

@@ -30,3 +34,3 @@ this.#bytes = Uint8Array.from(bytes)

/**
* @param {number[] | Uint8Array | ByteStream} bytes
* @param {number[] | string | Uint8Array | ByteStream} bytes
* @returns {ByteStream}

@@ -33,0 +37,0 @@ */

Sorry, the diff of this file is not supported yet

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