clone
Clones an object.
Signature
clone<T>(object:T): T
Parameters
Name | Type | Optional | Description |
---|---|---|---|
object | T | No | Specifies the object to clone. |
Return value
Returns a clone of the object which is no reference to the original object.
Example
import { clone } from "@tripetto/runner";
clone({ a: 1, b: 2 }); // Returns `{ a: 1, b: 2 }`