UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

22 lines (20 loc) 554 B
import "../../chunks/chunk-U5RRZUYZ.js"; // src/core/util/ArrayBuffers.ts import { base16 } from "./Encoding.js"; function arrayBufferToHex(arrayBuffer) { return base16.stringify(new Uint8Array(arrayBuffer), { pad: false }); } function concat(...arrays) { const totalLength = arrays.reduce((sum, array) => sum + array.length, 0); const result = new Uint8Array(totalLength); let offset = 0; for (const array of arrays) { result.set(array, offset); offset += array.length; } return result; } export { arrayBufferToHex, concat };