mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Remove toString coercion method use.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import root from './.internal/root.js'
|
||||
import toString from './toString.js'
|
||||
|
||||
/** Used to match leading and trailing whitespace. */
|
||||
const reTrimStart = /^\s+/
|
||||
@@ -34,7 +33,7 @@ function parseInt(string, radix) {
|
||||
} else if (radix) {
|
||||
radix = +radix
|
||||
}
|
||||
return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0)
|
||||
return nativeParseInt(`${ string }`.replace(reTrimStart, ''), radix || 0)
|
||||
}
|
||||
|
||||
export default parseInt
|
||||
|
||||
Reference in New Issue
Block a user