(input: string)
| 1 | export const isValidJSONString = (input: string): boolean => { |
| 2 | try { |
| 3 | JSON.parse(input); |
| 4 | return true; |
| 5 | } catch { |
| 6 | return false; |
| 7 | } |
| 8 | }; |
| 9 | |
| 10 | export const isBase64String = (str: string) => { |
| 11 | // Refer: https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript |
no test coverage detected