param { string } string param { ValueType } fallback export function tryParseJson < ValueType > ( string , fallback = null ) { try { return JSON . parse ( string ) || fallback ; } catch { return fallback ; } }