* Parses an optional positive-integer config value, returning 0 when unset/invalid.
(value: unknown)
| 160 | * Parses an optional positive-integer config value, returning 0 when unset/invalid. |
| 161 | */ |
| 162 | function parsePositiveInt(value: unknown): number { |
| 163 | if (value == null || value === '') return 0 |
| 164 | const num = Number(value) |
| 165 | return Number.isNaN(num) || num <= 0 ? 0 : Math.floor(num) |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * Maps a small array over an async worker with a bounded concurrency, preserving |
no outgoing calls
no test coverage detected