[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Buffer](https://evolu.dev/docs/api-reference/common/Buffer) › concatBytes

```ts
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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)

## Example

Builds a `nonce || ciphertext` style buffer.

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