mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Remove toString coercion method use.
This commit is contained in:
@@ -3,7 +3,6 @@ import copyArray from './.internal/copyArray.js'
|
||||
import isSymbol from './isSymbol.js'
|
||||
import stringToPath from './.internal/stringToPath.js'
|
||||
import toKey from './.internal/toKey.js'
|
||||
import toString from './toString.js'
|
||||
|
||||
/**
|
||||
* Converts `value` to a property path array.
|
||||
@@ -24,7 +23,7 @@ function toPath(value) {
|
||||
if (Array.isArray(value)) {
|
||||
return arrayMap(value, toKey)
|
||||
}
|
||||
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)))
|
||||
return isSymbol(value) ? [value] : copyArray(stringToPath(value))
|
||||
}
|
||||
|
||||
export default toPath
|
||||
|
||||
Reference in New Issue
Block a user