MCPcopy
hub / github.com/deployd/deployd / parseInt

Function parseInt

test-app/public/sinon.js:25103–25110  ·  view source on GitHub ↗

* Converts `string` to an integer of the specified radix. If `radix` is * `undefined` or `0`, a `radix` of `10` is used unless `value` is a * hexadecimal, in which case a `radix` of `16` is used. * * **Note:** This method aligns with the * [ES5 implementa

(string, radix, guard)

Source from the content-addressed store, hash-verified

25101 * // => [6, 8, 10]
25102 */
25103 function parseInt(string, radix, guard) {
25104 if (guard || radix == null) {
25105 radix = 0;
25106 } else if (radix) {
25107 radix = +radix;
25108 }
25109 return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
25110 }
25111
25112 /**
25113 * Repeats the given string `n` times.

Callers 15

stripOptionsFunction · 0.85
fFunction · 0.85
cFunction · 0.85
dFunction · 0.85
parseNumbersInObjectFunction · 0.85
jquery.jsFile · 0.85
mocha.jsFile · 0.85
hexWriteFunction · 0.85
useColorsFunction · 0.85
decodeFunction · 0.85
sinon.jsFile · 0.85

Calls 1

toStringFunction · 0.70

Tested by

no test coverage detected