(string)
| 57 | }; |
| 58 | |
| 59 | const stringToPath = function (string) { |
| 60 | const result = []; |
| 61 | if (string.charCodeAt(0) === charCodeOfDot) { |
| 62 | result.push(""); |
| 63 | } |
| 64 | string.replace(rePropName, function (match, expression, quote, subString) { |
| 65 | let key = match; |
| 66 | if (quote) { |
| 67 | key = subString.replace(reEscapeChar, "$1"); |
| 68 | } else if (expression) { |
| 69 | key = expression.trim(); |
| 70 | } |
| 71 | result.push(key); |
| 72 | }); |
| 73 | return result; |
| 74 | }; |
| 75 | |
| 76 | const castPath = function (value, object) { |
| 77 | if (Array.isArray(value)) { |