Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/bytes/concat.ts>concat

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function concat
import { concat } from "https://deno.land/std@0.220.1/bytes/concat.ts";

Concatenate an array of Uint8Arrays.

Examples

Example 1

import { concat } from "https://deno.land/std@0.220.1/bytes/concat.ts";

const a = new Uint8Array([0, 1, 2]);
const b = new Uint8Array([3, 4, 5]);
concat([a, b]); // Uint8Array(6) [ 0, 1, 2, 3, 4, 5 ]

Parameters

buf: Uint8Array[]

Returns

Uint8Array