ixfx
    Preparing search index...

    Function compareRange

    • Returns how b overlaps with a.

      Returns:

      • none if b does not overlap with a
      • equal if b has the same start and end as a
      • full if b is fully contained within a and a does not share a start/end
      • full-border if b is fully contained within a and a shares a start/end
      • partial if b overlaps with a but is not fully contained within it
      compareRange({ start:2, end:4 }, { start:0, end:1 }); // 'none'
      compareRange({ start:2, end:4 }, { start: 2, end:4 }); // 'equal'
      compareRange({ start:2, end:4 }, { start: 3, end: 3 }); // 'full'
      compareRange({ start:2, end:4 }, { start: 3, end: 4 }); // 'full-border'
      compareRange({ start:2, end:4 }, { start: 1, end: 3 }); // 'partial'

      Type Parameters

      • T extends Readonly<{ end: number; start: number }>

      Parameters

      Returns "none" | "partial" | "full" | "full-border" | "equal"