UNPKG

@ai2070/l0

Version:

L0: The Missing Reliability Substrate for AI

21 lines (20 loc) 370 B
function shallowClone(obj) { if (obj === null || obj === void 0) { return obj; } if (typeof obj !== "object") { return obj; } if (Array.isArray(obj)) { return [...obj]; } return { ...obj }; } function shallowCopy(source, target) { Object.assign(target, source); } export { shallowClone, shallowCopy }; //# sourceMappingURL=shallow.js.map