You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
573 B

4 years ago
  1. var isStrictComparable = require('./_isStrictComparable'),
  2. keys = require('./keys');
  3. /**
  4. * Gets the property names, values, and compare flags of `object`.
  5. *
  6. * @private
  7. * @param {Object} object The object to query.
  8. * @returns {Array} Returns the match data of `object`.
  9. */
  10. function getMatchData(object) {
  11. var result = keys(object),
  12. length = result.length;
  13. while (length--) {
  14. var key = result[length],
  15. value = object[key];
  16. result[length] = [key, value, isStrictComparable(value)];
  17. }
  18. return result;
  19. }
  20. module.exports = getMatchData;