From d28395fdb9a7352bbcb853bb71de973d4d8bad13 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 18 May 2016 14:51:54 -0700 Subject: [PATCH] Replace `toPairs` with `keys` in `getMatchData`. --- lodash.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index 5ebc076f8..f418ed6f4 100644 --- a/lodash.js +++ b/lodash.js @@ -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; }