@atlaskit/global-search
Version:
A cross-product search component (batteries included)
16 lines (13 loc) • 490 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.appendListWithoutDuplication = void 0;
var appendListWithoutDuplication = function appendListWithoutDuplication(resultsFirst, resultsSecond) {
return resultsFirst.concat(resultsSecond.filter(function (result) {
return resultsFirst.findIndex(function (o) {
return o.resultId === result.resultId;
}) === -1;
}));
};
exports.appendListWithoutDuplication = appendListWithoutDuplication;