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.stringToU8a = stringToU8a;
const x_textencoder_1 = require("@pezkuwi/x-textencoder");
const encoder = new x_textencoder_1.TextEncoder();
/**
* @name stringToU8a
* @summary Creates a Uint8Array object from a utf-8 string.
* @description
* String input values return the actual encoded `UInt8Array`. `null` or `undefined` values returns an empty encoded array.
* @example
* <BR>
*
* ```javascript
* import { stringToU8a } from '@pezkuwi/util';
*
* stringToU8a('hello'); // [0x68, 0x65, 0x6c, 0x6c, 0x6f]
* ```
*/
function stringToU8a(value) {
return value
? encoder.encode(value.toString())
: new Uint8Array();
}