textualize/frontend/redux/serialize.ts
Joshua Shoemaker b1880a41f2 refact: session to redux
not working yet
2023-10-20 10:51:53 -05:00

9 lines
227 B
TypeScript

const serialize = (value: unknown) => {
return JSON.parse(JSON.stringify(value))
}
const deserialize = (value: Record<string, any>, constructor: any): any => {
return constructor(value)
}
export { serialize, deserialize }