"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.clone = clone;
function clone(a) {
    if (typeof a !== 'object' || a === null) {
        return a;
    }
    if (a instanceof Set) {
        return new Set(a);
    }
    if (a.constructor.name === 'Array' || a.constructor.name === 'Object') {
        const _a = (Array.isArray(a) ? [] : {});
        for (const k in a) {
            _a[k] = clone(a[k]);
        }
        return _a;
    }
    return a;
}
//# sourceMappingURL=clone.js.map