<T>(key: string, is_json?: boolean, parse_fn?: ((value: unknown) => T | null) | undefined): T | null import {load_from_storage} from '@fuzdev/fuz_ui/storage.js'; Utility function to load a value from localStorage with optional parsing
key
the localStorage key
type
stringis_json
whether to parse the value as JSON
type
boolean default
falseparse_fn?
optional custom parsing function to transform the value
type
((value: unknown) => T | null) | undefinedoptional
returns
T | null the parsed value or null if not found or parsing fails
generics
load_from_storage<T>