(text: string | undefined, fallback: number)
| 342 | } |
| 343 | |
| 344 | private static _parseFloatSafe(text: string | undefined, fallback: number) { |
| 345 | if (!text) { |
| 346 | return fallback; |
| 347 | } |
| 348 | |
| 349 | const i = Number.parseFloat(text); |
| 350 | if (!Number.isNaN(i)) { |
| 351 | return i; |
| 352 | } |
| 353 | return fallback; |
| 354 | } |
| 355 | |
| 356 | private static _splitSafe(text: string | undefined, separator: string = ' '): string[] { |
| 357 | if (!text) { |
no test coverage detected