mirror of
https://github.com/zhaolihang/fast-deep-copy.git
synced 2026-04-25 00:00:02 +08:00
add test
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var deep_copy_1 = require("./deep-copy");
|
||||
var a = { dataA: 10, b: null };
|
||||
var b = { dataB: 20, a: null };
|
||||
a.b = b;
|
||||
b.a = a;
|
||||
var newA = deep_copy_1.deepCopy(a);
|
||||
console.log(newA.dataA === 10); //true
|
||||
console.log(newA.b.dataB === 20); //true
|
||||
console.log(newA.b.a === newA); //true
|
||||
//# sourceMappingURL=test.js.map
|
||||
Reference in New Issue
Block a user