Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 2.03 KB

clone.md

File metadata and controls

48 lines (39 loc) · 2.03 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


clone(value, [settings]) ⇒ unknown

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' }