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.22 to 0.1.23

2

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

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

@@ -16,11 +16,2 @@ /**

/**
* @typedef {string | number[] | {bytes: number[]}} ByteArrayLike
*/
/**
* Permissive conversion to bytes
* @param {ByteArrayLike} b
* @returns {number[]}
*/
export function toBytes(b: ByteArrayLike): number[];
/**
* Converts a list of uint8 bytes into its hexadecimal string representation.

@@ -33,5 +24,2 @@ * @example

export function bytesToHex(bytes: number[]): string;
export type ByteArrayLike = string | number[] | {
bytes: number[];
};
//# sourceMappingURL=base16.d.ts.map

@@ -26,2 +26,6 @@ import { padBits } from "../bits/index.js"

if (hex.startsWith("#")) {
hex = hex.slice(1)
}
const bytes = []

@@ -49,23 +53,2 @@

/**
* @typedef {string | number[] | {bytes: number[]}} ByteArrayLike
*/
/**
* Permissive conversion to bytes
* @param {ByteArrayLike} b
* @returns {number[]}
*/
export function toBytes(b) {
if (Array.isArray(b)) {
return b
} else if (typeof b == "string") {
return hexToBytes(b)
} else if (typeof b == "object" && "bytes" in b) {
return b.bytes
} else {
throw new Error("not ByteArrayLike")
}
}
/**
* Converts a list of uint8 bytes into its hexadecimal string representation.

@@ -72,0 +55,0 @@ * @example

export * from "./bits/index.js";
export * from "./bytes/index.js";
export * from "./int/index.js";
export * from "./option/index.js";
export * from "./utf8/index.js";
export type Option<T> = import("./option/index.js").Option<T>;
//# sourceMappingURL=index.d.ts.map
export * from "./bits/index.js"
export * from "./bytes/index.js"
export * from "./int/index.js"
export * from "./option/index.js"
export * from "./utf8/index.js"
/**
* @template T
* @typedef {import("./option/index.js").Option<T>} Option
*/

Sorry, the diff of this file is not supported yet

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