/**
 * Deep-clones a JSON object or array.
 */
export function deepClone(obj) {
    let clone = Array.isArray(obj) ? [] : {};
    for (let key of Object.keys(obj)) {
        let value = obj[key];
        if (typeof value === "object" && value) {
            value = deepClone(value);
        }
        clone[key] = value;
    }
    return clone;
}
//# sourceMappingURL=deep-clone.js.map