Skip to Content
Arraycopy

copy

Returns a shallow copy version an array

Import

import { copy } from '@fullstacksjs/toolbox';

Signature

function copy<T extends any[]>(arr: T): T {}

Examples

copy([]) // [] copy([1]) // [1]
Last updated on