(json: string | null)
| 1 | export const tryParseJson = <T>(json: string | null): T | undefined => { |
| 2 | if (!json) return undefined |
| 3 | try { |
| 4 | return JSON.parse(json) |
| 5 | } catch (_e) { |
| 6 | return undefined |
| 7 | } |
| 8 | } |
| 9 | |
| 10 | export const uppercaseFirstLetter = (value: string) => |
| 11 | value.charAt(0).toUpperCase() + value.slice(1) |
no outgoing calls
no test coverage detected