MCPcopy Create free account
hub / github.com/ccj-007/easy-lowcode / saveJSON

Function saveJSON

src/utils/storage.ts:5–7  ·  view source on GitHub ↗
(key: string, data: GlobalJSON | EditObj)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected