• Concatenates multiple byte-like arrays to the first number array.

    Parameters

    • result: number[]

      The number array as result

    • Rest...args: BytesLike[]

      The byte-like arrays to concatenate.

    Returns number[]

    The first number array

    const concatenatedBytes = [1, 2];
    bytesConcatTo(
    concatenatedBytes
    new Uint8Array([3, 4]),
    "hello",
    [5, 6, 7]
    );
    console.log(concatenatedBytes); // Outputs [1, 2, 3, 4, /* bytes of "hello" */, 5, 6, 7]