* Converts `value` to property path array if it is not one. * * @private * @param {*} value The value to process. * @returns {Array} Returns the property path array.
(value)
| 5973 | * @returns {Array} Returns the property path array. |
| 5974 | */ |
| 5975 | function toPath(value) { |
| 5976 | if (isArray(value)) { |
| 5977 | return value; |
| 5978 | } |
| 5979 | var result = []; |
| 5980 | baseToString(value).replace(rePropName, function(match, number, quote, string) { |
| 5981 | result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); |
| 5982 | }); |
| 5983 | return result; |
| 5984 | } |
| 5985 | |
| 5986 | /** |
| 5987 | * Creates a clone of `wrapper`. |
no test coverage detected