synapse-react-client
Version:
[](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [](https://badge.fury.io/js/synaps
19 lines • 799 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getUniqueEntities = void 0;
var getUniqueEntities = function (data, mapIdToHeader, indicies) {
var distinctEntities = new Set();
data.queryResult.queryResults.rows.forEach(function (row) {
row.values.forEach(function (el, colIndex) {
// make sure this is a column of type entity and that we haven't retrieved this entity's information prior
if (indicies.includes(colIndex) &&
!Object.prototype.hasOwnProperty.call(mapIdToHeader, el) &&
el) {
distinctEntities.add(el);
}
});
});
return distinctEntities;
};
exports.getUniqueEntities = getUniqueEntities;
//# sourceMappingURL=getUniqueEntities.js.map