A javascript library for working with objects
Deep clone a value.
Param | Type | Default | Description |
---|---|---|---|
value | unknown |
The data to clone. | |
[settings] | object |
Settings object. | |
[settings.ignoreKeys] | Array , string |
Any keys in this array will not be cloned. | |
[settings.isCircular] | boolean |
false |
If true then circular references will be handled. |
Example
import { clone } from 'object-agent';
clone({ a: 'b', c: 'd' });
// => { a: 'b', c: 'd' }