Nuclear Package Magnet

    intervals-fn
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.3 • Public • Published

    Intervals-fn

    Enable manipulation on interval object.

    Build Status Maintainability Test Coverage code style: prettier semantic-release Commitizen friendly npm version

    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

    { startnumber, endnumber };
     
    { fromnumber, tonumber };
     
    [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

    TypeScript support

    Intervals-fn includes typings for TypeScript.

    Contributing

    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.

    Install

    npm i intervals-fn

    DownloadsWeekly Downloads

    981

    Version

    3.0.3

    License

    MIT

    Unpacked Size

    54.8 kB

    Total Files

    13

    Last publish

    Collaborators

    • draeken