(ms)
| 83 | while (true) { |
| 84 | const [value, next] = takeFlagValue(current, flag); |
| 85 | if (value === undefined) |
| 86 | return [values, current]; |
| 87 | values.push(value); |
| 88 | current = next; |
| 89 | } |
| 90 | } |
| 91 | function parsePositiveInt(value, fallback = 0) { |
| 92 | const parsed = Number.parseInt(String(value || ""), 10); |
| 93 | return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback; |
| 94 | } |
| 95 | function parseNonNegativeInt(value, fallback = 0) { |
| 96 | const parsed = Number.parseInt(String(value || ""), 10); |
no outgoing calls
no test coverage detected