Skip to main content
Module

x/discord_rpc_deno/deps.ts>bytes.concat

port of @xhayper/discord-rpc to deno
Go to Latest
function bytes.concat
import { bytes } from "https://deno.land/x/discord_rpc_deno@v1.1.1/deps.ts";
const { concat } = bytes;

Concatenate an array of Uint8Arrays.

Examples

Example 1

import { concat } from "https://deno.land/std@0.224.0/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

Examples

Example 1

import { concat } from "https://deno.land/std@0.224.0/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