(error: any)
| 67 | !guard(el) |
| 68 | |
| 69 | export const errorToString = (error: any) => { |
| 70 | const stack = process.env.CL_DEBUG ? error.stack : undefined |
| 71 | const str = error.toString() |
| 72 | const stackStr = stack ? `\n${stack}` : '' |
| 73 | if (str !== '[object Object]') return str + stackStr |
| 74 | |
| 75 | return JSON.stringify({ ...error, stack }, null, 2) |
| 76 | } |
| 77 | |
| 78 | export const capitalizeFirstLetter = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1) |
| 79 |
no outgoing calls
no test coverage detected
searching dependent graphs…