ConstRead a value from localStorage, parsing JSON when possible.
Usage:
import { setLocalJSON, getLocalJSON } from "mazey";
setLocalJSON("preferences", { theme: "dark" });
const preferences = getLocalJSON("preferences");
console.log(JSON.stringify(preferences));
Output:
{"theme":"dark"}
Storage key.
The parsed value, raw stored value, or null when no value exists.
Deprecated alias of getLocalJSON.