mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Replace toPairs with keys in getMatchData.
This commit is contained in:
@@ -5389,11 +5389,14 @@
|
|||||||
* @returns {Array} Returns the match data of `object`.
|
* @returns {Array} Returns the match data of `object`.
|
||||||
*/
|
*/
|
||||||
function getMatchData(object) {
|
function getMatchData(object) {
|
||||||
var result = toPairs(object),
|
var result = keys(object),
|
||||||
length = result.length;
|
length = result.length;
|
||||||
|
|
||||||
while (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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user