🔗 Function: asJSON()
asJSON<
T,E>(fallback):Parser<T,E>
Defined in: src/lib/parsers.ts:111
Parse a string as a JSON serialized object with a fallback
🔗 Type Parameters
🔗 T
T extends object
🔗 E
E extends Element = HTMLElement
🔗 Parameters
🔗 fallback
Fallback<T, E>
Fallback value or extractor function
🔗 Returns
Parser<T, E>
Parser function
🔗 Since
0.11.0
🔗 Throws
If the value and fallback are both null or undefined
🔗 Throws
If value is not a valid JSON string