* Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array.
(value, object)
| 15084 | * @returns {Array} Returns the cast property path array. |
| 15085 | */ |
| 15086 | function castPath(value, object) { |
| 15087 | if (isArray(value)) { |
| 15088 | return value; |
| 15089 | } |
| 15090 | return isKey(value, object) ? [value] : stringToPath(toString(value)); |
| 15091 | } |
| 15092 | |
| 15093 | /** |
| 15094 | * A `baseRest` alias which can be replaced with `identity` by module |