API reference@evolu/commonBuffer › concatBytes

function concatBytes(
  ...arrays: TArg<Uint8Array<ArrayBufferLike>[]>
): Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>;

Defined in: node_modules/@noble/ciphers/utils.d.ts:416

Copies several Uint8Arrays into one.

Throws

On wrong argument types inside the byte-array list. TypeError

Example

Builds a nonce || ciphertext style buffer.

concatBytes(new Uint8Array([1]), new Uint8Array([2]));