11d758a a296341 11d758a a296341 11d758a
1
2
3
4
5
6
7
8
export function getValidString(something: any, defaultValue: string) { const strValue = `${something || defaultValue}` try { return JSON.parse(strValue) } catch (err) { return strValue } }