(value: any)
| 242 | } |
| 243 | |
| 244 | export function smartStringify(value: any): string { |
| 245 | if (typeof value === 'number') { |
| 246 | if (Number.isNaN(value)) { |
| 247 | return 'NaN'; |
| 248 | } else if (!Number.isFinite(value)) { |
| 249 | return 'Infinity'; |
| 250 | } |
| 251 | } else if (value === undefined) { |
| 252 | return 'undefined'; |
| 253 | } |
| 254 | |
| 255 | return JSON.stringify(value); |
| 256 | } |
| 257 | |
| 258 | const STACK_DELIMETER = /\n\s+at /; |
| 259 | const STACK_SOURCE_LOCATION = /([^\s]+) \((.+):(.+):(.+)\)/; |
no outgoing calls
no test coverage detected