4 lines
116 B
JavaScript
4 lines
116 B
JavaScript
|
export function safeParse (str) {
|
||
|
return !str ? undefined : (str === 'undefined' ? undefined : JSON.parse(str))
|
||
|
}
|