chore: update to version 14.0.11 and align website URLs

This commit is contained in:
2026-01-11 11:34:13 +03:00
parent ef74383349
commit 19c8d69bd8
1499 changed files with 53633 additions and 89 deletions
+24
View File
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.compactStripLength = compactStripLength;
const fromU8a_js_1 = require("./fromU8a.js");
/**
* @name compactStripLength
* @description Removes the length prefix, returning both the total length (including the value + compact encoding) and the decoded value with the correct length
* @example
* <BR>
*
* ```javascript
* import { compactStripLength } from '@pezkuwi/util';
*
* console.log(compactStripLength(new Uint8Array([2 << 2, 0xde, 0xad]))); // [2, Uint8Array[0xde, 0xad]]
* ```
*/
function compactStripLength(input) {
const [offset, length] = (0, fromU8a_js_1.compactFromU8a)(input);
const total = offset + length.toNumber();
return [
total,
input.subarray(offset, total)
];
}