Replace toPairs with keys in getMatchData.

This commit is contained in:
John-David Dalton
2016-05-18 14:51:54 -07:00
parent 84b8ee7bda
commit d28395fdb9

View File

@@ -5389,11 +5389,14 @@
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = toPairs(object),
var result = keys(object),
length = result.length;
while (length--) {
result[length][2] = isStrictComparable(result[length][1]);
var key = result[length],
value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}