mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Simplify reIsDeepProp and rePropName.
This commit is contained in:
@@ -88,8 +88,8 @@
|
|||||||
reInterpolate = /<%=([\s\S]+?)%>/g;
|
reInterpolate = /<%=([\s\S]+?)%>/g;
|
||||||
|
|
||||||
/** Used to match property names within property paths. */
|
/** Used to match property names within property paths. */
|
||||||
var reIsDeepProp = /\.|\[(?:\d+(?:\.\d+)?|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/,
|
var reIsDeepProp = /\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/,
|
||||||
rePropName = /([^.[\]]+)|\[(?:(\d+(?:\.\d+)?)|(["'])((?:(?!\3)[^\n\\]|\\.)*?)\3)\]/g;
|
rePropName = /[^.[\]]+|\[(?:(\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
|
* Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
|
||||||
|
|||||||
Reference in New Issue
Block a user