* 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 implementation](https://es5.gi
(string, radix, guard)
| 22196 | * // => [6, 8, 10] |
| 22197 | */ |
| 22198 | function parseInt(string, radix, guard) { |
| 22199 | if (guard || radix == null) { |
| 22200 | radix = 0; |
| 22201 | } else if (radix) { |
| 22202 | radix = +radix; |
| 22203 | } |
| 22204 | return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); |
| 22205 | } |
| 22206 | |
| 22207 | /** |
| 22208 | * Repeats the given string `n` times. |
no test coverage detected