@empathyco/x-components
Version:
Empathy X Components
16 lines (14 loc) • 341 B
JavaScript
/**
* Deeply clones an object or an array.
*
* @param something - The object to clone.
* @returns A deep clone of the provided value.
*
* @public
*/
function clone(something) {
// eslint-disable-next-line ts/no-unsafe-return
return JSON.parse(JSON.stringify(something));
}
export { clone };
//# sourceMappingURL=clone.js.map