Skip to content

Latest commit

History

History
22 lines (15 loc) 路 285 Bytes

copy.mdx

File metadata and controls

22 lines (15 loc) 路 285 Bytes

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]