@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
16 lines (15 loc) • 448 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getFirstIntersection = getFirstIntersection;
exports.matchIsArray = matchIsArray;
function matchIsArray(value, filled) {
var isArray = Array.isArray(value);
return filled ? isArray && value.length > 0 : isArray;
}
function getFirstIntersection(arrayA, arrayB) {
return arrayA.find(function (element) {
return arrayB.includes(element);
}) || null;
}