mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Minor cleanup in stringToPath.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import memoizeCapped from './memoizeCapped.js'
|
||||
|
||||
/** Used to match property names within property paths. */
|
||||
const reEscapeChar = /\\(\\)?/g
|
||||
const reLeadingDot = /^\./
|
||||
|
||||
const rePropName = RegExp(
|
||||
// Match anything that isn't a dot or bracket.
|
||||
'[^.[\\]]+' + '|' +
|
||||
@@ -17,9 +16,6 @@ const rePropName = RegExp(
|
||||
'(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))'
|
||||
, 'g')
|
||||
|
||||
/** Used to match backslashes in property paths. */
|
||||
const reEscapeChar = /\\(\\)?/g
|
||||
|
||||
/**
|
||||
* Converts `string` to a property path array.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user