(key: string, data: GlobalJSON | EditObj)
| 3 | import { GlobalJSON } from '@/types/json'; |
| 4 | |
| 5 | export const saveJSON = (key: string, data: GlobalJSON | EditObj) => { |
| 6 | localStorage.setItem(key, JSON.stringify(data)) |
| 7 | } |
| 8 | export const getJSON = (key: string) => { |
| 9 | const obj = localStorage.getItem(key) |
| 10 | return obj ? JSON.parse(obj) : null |
nothing calls this directly
no outgoing calls
no test coverage detected