Skip to content

Should concat accept iterables as well... #8

@jasnell

Description

@jasnell

Right now the usage pattern would be like...

const u8_1 = new Uint8Array(10);
const u8_2 = new Uint8Array(10);
const u8_3 = Uint8Array.concat([u8_1, u8_2]);

With the expectation that the inputs are always the same type.

Should we also support...

const u8_1 = new Uint8Array(10);
const u8_2 = [1,2,3];
const u8_3 = Uint8Array.concat([u8_1, u8_2]);

With the notion that the inputs can be a mix of iterables with the constraint that the iterable must yield values of an acceptable type for the TypedArray type?

/cc @bakkot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions