(text: string | undefined, fallback: number)
| 330 | } |
| 331 | |
| 332 | private static _parseIntSafe(text: string | undefined, fallback: number) { |
| 333 | if (!text) { |
| 334 | return fallback; |
| 335 | } |
| 336 | |
| 337 | const i = Number.parseInt(text, 10); |
| 338 | if (!Number.isNaN(i)) { |
| 339 | return i; |
| 340 | } |
| 341 | return fallback; |
| 342 | } |
| 343 | |
| 344 | private static _parseFloatSafe(text: string | undefined, fallback: number) { |
| 345 | if (!text) { |
no test coverage detected