Cleanup stringToPath.

This commit is contained in:
John-David Dalton
2017-01-10 17:25:48 -08:00
parent c5d4bb8dcb
commit 003c11c36b
2 changed files with 3 additions and 2 deletions

View File

@@ -1,7 +1,8 @@
import memoizeCapped from './.internal/memoizeCapped.js';
/** Used to match property names within property paths. */
const reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
const reLeadingDot = /^\./;
const rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/** Used to match backslashes in property paths. */
const reEscapeChar = /\\(\\)?/g;