cloneObject()function

cloneObject(input: T): T
ParamType
inputT
The object to clone. required
Return
T
A new object with the same prototype and props as input.

Shallow clone an object with the same prototype.

Examples

cloneObject({ a: 1 }); // { a: 1 }