@rbxts/deepcopy
v0.1.3
Published
DeepCopy utility function.
Downloads
545
Readme
Deep Copy
Changes
- Renamed
DeepCopy
todeepCopy
.
Installation
npm i @rbxts/deepcopy
Example Usage
import { deepCopy } from "@rbxts/deepcopy";
deepCopy(new Map<string, number>()); // Copied - Map<string, number>
deepCopy([1, 5, 8]); // Copied - [1, 5, 8]
deepCopy({
["key"]: {
["key2"]: "value"
}
}) // Copied - { ["key"]: { ["key2"]: "value" } }