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
+21
View File
@@ -0,0 +1,21 @@
import { xglobal } from '@pezkuwi/x-global';
import { hasBuffer } from '../has.js';
/**
* @name u8aToBuffer
* @summary Creates a Buffer object from a hex string.
* @description
* `null` inputs returns an empty `Buffer` result. `UInt8Array` input values return the actual bytes value converted to a `Buffer`. Anything that is not a `UInt8Array` throws an error.
* @example
* <BR>
*
* ```javascript
* import { u8aToBuffer } from '@pezkuwi/util';
*
* console.log('Buffer', u8aToBuffer(new Uint8Array([1, 2, 3])));
* ```
*/
export function u8aToBuffer(value) {
return hasBuffer
? xglobal.Buffer.from(value || [])
: new Uint8Array(value || []);
}