Bump to v4.7.0.

This commit is contained in:
John-David Dalton
2016-03-26 00:00:01 -07:00
parent 6c2960211f
commit d46bcaa98d
389 changed files with 3333 additions and 1627 deletions

View File

@@ -1,4 +1,4 @@
define(['./toString'], function(toString) {
define(['./memoize', './toString'], function(memoize, toString) {
/** Used to match property names within property paths. */
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
@@ -13,13 +13,13 @@ define(['./toString'], function(toString) {
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
function stringToPath(string) {
var stringToPath = memoize(function(string) {
var result = [];
toString(string).replace(rePropName, function(match, number, quote, string) {
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
});
return result;
}
});
return stringToPath;
});