Skip to content
This repository was archived by the owner on Mar 5, 2018. It is now read-only.

Latest commit

 

History

History
30 lines (23 loc) · 333 Bytes

File metadata and controls

30 lines (23 loc) · 333 Bytes

Clone

Using clone

import clone from 'consus-core/clone';

let original = {
    a: [0, 1, 2],
    b: 'Hello, World!',
    c: 3.14159265
};

let twin = clone(original);

twin;
/*
{
    a: [0, 1, 2],
    b: 'Hello, World!',
    c: 3.14159265
}
*/

twin === original;
// false

twin.a === original.a;
// false