Bump to v4.7.0.

This commit is contained in:
John-David Dalton
2016-03-26 00:00:36 -07:00
parent a83b4ebd53
commit ce0b51888c
394 changed files with 1789 additions and 841 deletions

View File

@@ -1,3 +1,4 @@
import memoize from './memoize';
import toString from './toString';
/** Used to match property names within property paths. */
@@ -13,12 +14,12 @@ var reEscapeChar = /\\(\\)?/g;
* @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;
}
});
export default stringToPath;