Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

intervals-fn

Package Overview
Dependencies
1
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    intervals-fn

Manipulate intervals in a functional way


Version published
Weekly downloads
1.2K
decreased by-18.31%
Maintainers
1
Install size
0.988 MB
Created
Weekly downloads
 

Readme

Source

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

{ 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

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.

Keywords

FAQs

Last updated on 27 Jun 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc