mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
11 lines
214 B
TypeScript
11 lines
214 B
TypeScript
/**
|
|
* Serialize an object to JSON and back to a new object
|
|
*/
|
|
export const parseify = (obj: unknown) => {
|
|
try {
|
|
return JSON.parse(JSON.stringify(obj));
|
|
} catch {
|
|
return 'Error parsing object';
|
|
}
|
|
};
|