waterline-postgresql
Version:
PostgreSQL Adapter for Sails and Waterline
22 lines (18 loc) • 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;