cloneObject()function
cloneObject(input: T): T
| Param | Type | |
|---|---|---|
input | T | 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 }