fast-deep-copy-ts/dist/test.js
2017-09-23 15:26:41 +08:00

12 lines
388 B
JavaScript

"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