import { concatUint8Arrays } from "https://deno.land/x/fathym_common@v0.2.167/src/common/iterables/concatUint8Arrays.ts";
Concatenate two Uint8Array objects into a new Uint8Array object.
Examples
From direct import
From direct import
import { Uint8Array } from '@fathym/common/iterables';
const a = new Uint8Array([1, 2, 3]);
const b = new Uint8Array([4, 5, 6]);
const concatenated = concatUint8Arrays(a, b);
console.log(concatenated); // [1, 2, 3, 4, 5, 6]
From common import
From common import
import { Uint8Array } from '@fathym/common';
const a = new Uint8Array([1, 2, 3]);
const b = new Uint8Array([4, 5, 6]);
const concatenated = concatUint8Arrays(b, a);
console.log(concatenated); // [4, 5, 6, 1, 2, 3]