Nymbo's picture
Sync with upstream huggingface-projects/inference-playground (node 22, current Svelte app)
4e2820e verified
Raw History Blame Contribute Delete
105 Bytes
export function safeParse(str: string) {
try {
return JSON.parse(str);
} catch {
return null;
}
}