Intervals-fn
Enable manipulation on interval object.
What's in the box
All function are curried. Output keeps the input's structure and type. No input mutation.Unary operation
- Simplify
Binary operations
- Intersection
- Union
- Subtraction
Manipulations
- Complement
- Merge
- Split
Tests (Allen's interval relations)
- After
- Before
- During
- Ending
- Equal
- Meeting
- Overlapping
- Starting
Accepted input
Functions marked with*
both accept interval and Array/ReadonlyArray of interval{ start: number, end: number };
{ from: number, to: number };
[number, number];
Installation
Intervals-fn is distributed on the latest channel:$ npm install intervals-fn --save
Advenced docs
Visit the homepage for an extensive API documentation:https://js-republic.github.io/intervals-fn