* 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)
| 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. |
no test coverage detected