@helios-lang/codec-utils
Advanced tools
Comparing version 0.1.19 to 0.1.20
{ | ||
"name": "@helios-lang/codec-utils", | ||
"version": "0.1.19", | ||
"version": "0.1.20", | ||
"description": "Primitive manipulation functions commonly used in encoding and decoding algorithms", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -30,2 +30,6 @@ export class ByteStream { | ||
/** | ||
* @returns {number[]} | ||
*/ | ||
peekRemaining(): number[]; | ||
/** | ||
* @returns {number} | ||
@@ -39,4 +43,8 @@ */ | ||
shiftMany(n: number): number[]; | ||
/** | ||
* @returns {number[]} | ||
*/ | ||
shiftRemaining(): number[]; | ||
#private; | ||
} | ||
//# sourceMappingURL=ByteStream.d.ts.map |
@@ -84,2 +84,9 @@ import { hexToBytes } from "./base16.js" | ||
/** | ||
* @returns {number[]} | ||
*/ | ||
peekRemaining() { | ||
return Array.from(this.#bytes.slice(this.#pos)) | ||
} | ||
/** | ||
* @returns {number} | ||
@@ -114,2 +121,11 @@ */ | ||
} | ||
/** | ||
* @returns {number[]} | ||
*/ | ||
shiftRemaining() { | ||
const res = Array.from(this.#bytes.slice(this.#pos)) | ||
this.#pos = this.#bytes.length | ||
return res | ||
} | ||
} |
@@ -0,4 +1,5 @@ | ||
export { toBytes } from "./ByteArrayLike.js"; | ||
export { ByteStream } from "./ByteStream.js"; | ||
export type ByteArrayLike = import("./base16.js").ByteArrayLike; | ||
export { bytesToHex, hexToBytes, toBytes } from "./base16.js"; | ||
export type ByteArrayLike = import("./ByteArrayLike.js").ByteArrayLike; | ||
export { bytesToHex, hexToBytes } from "./base16.js"; | ||
export { Base32, decodeBase32, encodeBase32, isValidBase32 } from "./base32.js"; | ||
@@ -5,0 +6,0 @@ export { Base64, decodeBase64, encodeBase64, isValidBase64 } from "./base64.js"; |
@@ -0,3 +1,4 @@ | ||
export { toBytes } from "./ByteArrayLike.js" | ||
export { ByteStream } from "./ByteStream.js" | ||
export { bytesToHex, hexToBytes, toBytes } from "./base16.js" | ||
export { bytesToHex, hexToBytes } from "./base16.js" | ||
export { Base32, decodeBase32, encodeBase32, isValidBase32 } from "./base32.js" | ||
@@ -8,3 +9,3 @@ export { Base64, decodeBase64, encodeBase64, isValidBase64 } from "./base64.js" | ||
/** | ||
* @typedef {import("./base16.js").ByteArrayLike} ByteArrayLike | ||
* @typedef {import("./ByteArrayLike.js").ByteArrayLike} ByteArrayLike | ||
*/ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68892
66
2107