UNPKG

@ai2070/l0

Version:

L0: The Missing Reliability Substrate for AI

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