@nickbusey/thelounge
Version:
The self-hosted Web IRC client
12 lines (11 loc) • 475 B
JavaScript
;
// Return true if any section of "a" or "b" parts (defined by their start/end
Object.defineProperty(exports, "__esModule", { value: true });
// markers) intersect each other, false otherwise.
function anyIntersection(a, b) {
return ((a.start <= b.start && b.start < a.end) ||
(a.start < b.end && b.end <= a.end) ||
(b.start <= a.start && a.start < b.end) ||
(b.start < a.end && a.end <= b.end));
}
exports.default = anyIntersection;