Remove toString coercion method use.

This commit is contained in:
John-David Dalton
2017-03-14 23:27:37 -07:00
parent 351e44a127
commit b8a3a42278
16 changed files with 9 additions and 45 deletions

View File

@@ -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