All specs 1 total
safeJsonParseREAL LLM gemma4:latest · · unknownsrc/utils/date.ts
Safely attempts to parse a string input into a specified type. It accepts either a string or null as input and returns the parsed object of type T if successful, or undefined if the input is null, empty, or if the string content is not valid JSON. This function has no observable side effects other than returning the parsed value or undefined.