mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v4.5.1.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# lodash.method v4.5.0
|
||||
# lodash.method v4.5.1
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.method` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var method = require('lodash.method');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.method) for more details.
|
||||
See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash.method) for more details.
|
||||
|
||||
@@ -24,7 +24,8 @@ var funcTag = '[object Function]',
|
||||
/** Used to match property names within property paths. */
|
||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||
reIsPlainProp = /^\w*$/,
|
||||
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g;
|
||||
reLeadingDot = /^\./,
|
||||
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
||||
|
||||
/**
|
||||
* Used to match `RegExp`
|
||||
@@ -707,8 +708,13 @@ function parent(object, path) {
|
||||
* @returns {Array} Returns the property path array.
|
||||
*/
|
||||
var stringToPath = memoize(function(string) {
|
||||
string = toString(string);
|
||||
|
||||
var result = [];
|
||||
toString(string).replace(rePropName, function(match, number, quote, string) {
|
||||
if (reLeadingDot.test(string)) {
|
||||
result.push('');
|
||||
}
|
||||
string.replace(rePropName, function(match, number, quote, string) {
|
||||
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
||||
});
|
||||
return result;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.method",
|
||||
"version": "4.5.0",
|
||||
"version": "4.5.1",
|
||||
"description": "The lodash method `_.method` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
Reference in New Issue
Block a user