UNPKG

@wulperstudio/cms

Version:
16 lines (15 loc) 448 B
"use strict"; 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; }