@newdash/newdash
Version:
javascript/typescript utility library
26 lines (25 loc) • 886 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const isStrictComparable_1 = __importDefault(require("./isStrictComparable"));
const keys_1 = __importDefault(require("../keys"));
/**
* 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) {
const result = (0, keys_1.default)(object);
let length = result.length;
while (length--) {
const key = result[length];
const value = object[key];
result[length] = [key, value, (0, isStrictComparable_1.default)(value)];
}
return result;
}
exports.default = getMatchData;