How to use the clone function from traverse
Find comprehensive JavaScript traverse.clone code examples handpicked from public code repositorys.
GitHub: jofelgandeza/budget
55 56 57 58 59 60 61 62 63 64 65
assert.deepEqual(res.c, [ 3, 4 ]); }; exports.cloneT = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse.clone(obj); assert.deepEqual(obj, res); assert.ok(obj !== res); obj.a ++; assert.deepEqual(res.a, 1);
0
0
1
traverse.deepEqual is the most popular function in traverse (8 examples)