(value, name, allowZero = false)
| 96 | } |
| 97 | |
| 98 | function parseUnsignedInteger(value, name, allowZero = false) { |
| 99 | if (typeof value !== 'string' || RegExpPrototypeExec(kDigitsRegex, value) === null) { |
| 100 | throw new ERR_DEBUGGER_STARTUP_ERROR(`Invalid ${name}: ${value}`); |
| 101 | } |
| 102 | const parsed = NumberParseInt(value, 10); |
| 103 | if (NumberIsNaN(parsed) || (!allowZero && parsed < 1)) { |
| 104 | throw new ERR_DEBUGGER_STARTUP_ERROR(`Invalid ${name}: ${value}`); |
| 105 | } |
| 106 | return parsed; |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * @param {string} text Raw `--probe` argument. |
no outgoing calls
no test coverage detected
searching dependent graphs…