Enable manipulation on interval object.
All function are curried. Output keeps the input's structure and type. No input mutation.
- Simplify
- Intersection *
- Union *
- Subtraction *
- Complement *
- Merge
- Split *
Tests (Allen's interval relations)
- After
- Before
- During
- Ending
- Equal
- Meeting
- Overlapping *
- Starting
Functions marked with *
both accept interval and Array/ReadonlyArray of interval
{ start: number, end: number };
{ from: number, to: number };
[number, number];
Intervals-fn is distributed on the latest channel:
$ npm install intervals-fn --save
Visit the homepage for an extensive API documentation:
https://js-republic.github.io/intervals-fn
Intervals-fn includes typings for TypeScript.
Contributions are welcome and appreciated. Feel free to start an issue or create a pull requests. This repo use AngularJS's commit message convention. You can use cz-cli to format your commit.