Files
lodash/internal/getMatchData.js
John-David Dalton 0646bacd86 Bump to v4.0.0.
2016-01-12 08:28:18 -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;