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