(value: string)
| 42 | const clamp01 = (v: number): number => Math.min(1, Math.max(0, v)); |
| 43 | |
| 44 | const parsePercent = (value: string): number | null => { |
| 45 | const m = value.trim().match(/^(\d+(?:\.\d+)?)%$/); |
| 46 | if (!m) return null; |
| 47 | const p = Number(m[1]) / 100; |
| 48 | return Number.isFinite(p) ? p : null; |
| 49 | }; |
| 50 | |
| 51 | const normalizeStackId = (stack: unknown): string => { |
| 52 | if (typeof stack !== 'string') return ''; |
no outgoing calls
no test coverage detected