(received: number, total: number)
| 109 | }; |
| 110 | |
| 111 | export const computeProgress = (received: number, total: number): number => |
| 112 | total > 0 |
| 113 | ? Math.min(100, Math.max(0, Math.floor((received / total) * 100))) |
| 114 | : 0; |
| 115 | |
| 116 | export const fetchWithTimeout = ( |
| 117 | url: string, |
no outgoing calls
no test coverage detected