MCPcopy Index your code
hub / github.com/nodejs/node / parseUnsignedInteger

Function parseUnsignedInteger

lib/internal/debugger/inspect_probe.js:98–107  ·  view source on GitHub ↗
(value, name, allowZero = false)

Source from the content-addressed store, hash-verified

96}
97
98function 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.

Callers 2

parseProbeTargetFunction · 0.85
parseProbeTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…