getData<T>(key: string, def?: T): T | null

Get data from local storage, if not present can set to a default value.

paramkey- The key to get data from.

paramdef- The default value to set if not found.

returnsThe data or null if not found.

sincev2000.0