(value: string | null | undefined)
| 24 | } |
| 25 | |
| 26 | export function parseTimestamp(value: string | null | undefined) { |
| 27 | if (!value) { |
| 28 | return 0; |
| 29 | } |
| 30 | |
| 31 | const timestamp = Date.parse(value); |
| 32 | return Number.isNaN(timestamp) ? 0 : timestamp; |
| 33 | } |
| 34 | |
| 35 | export function pickPreferredManagedAgent(agents: ManagedAgent[]) { |
| 36 | return [...agents].sort((left, right) => { |
no test coverage detected