()
| 18 | }; |
| 19 | |
| 20 | const processingConcurrency = () => { |
| 21 | const available = |
| 22 | typeof navigator === 'undefined' ? 2 : navigator.hardwareConcurrency || 2; |
| 23 | return Math.max(1, Math.min(MAX_PROCESSING_CONCURRENCY, available)); |
| 24 | }; |
| 25 | |
| 26 | export const processWithConcurrency = async <Input, Output>( |
| 27 | items: readonly Input[], |
no outgoing calls
no test coverage detected