(s: string)
| 38 | /** Version + whether the git checkout is behind its remote (populated best-effort). */ |
| 39 | update?: { version?: string; updateAvailable: boolean; behind: number; message: string; ok: boolean }; |
| 40 | } |
| 41 | |
| 42 | const esc = (s: string) => String(s).replace(/[&<>"]/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]!)); |
| 43 | const num = (n: number) => n >= 1000 ? `${(n / 1000).toFixed(n >= 100000 ? 0 : 1)}k` : String(n); |
no outgoing calls
no test coverage detected