Files
lodash/_getMatchData.js
John-David Dalton bbd78fee4d Bump to v4.1.0.
2016-01-29 08:30:29 -08:00

22 lines
523 B
JavaScript

var isStrictComparable = require('./_isStrictComparable'),
toPairs = require('./toPairs');
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = toPairs(object),
length = result.length;
while (length--) {
result[length][2] = isStrictComparable(result[length][1]);
}
return result;
}
module.exports = getMatchData;