Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

intervals-fn

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intervals-fn

Manipulate intervals in a functional way

  • 2.5.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
increased by230.76%
Maintainers
1
Weekly downloads
 
Created
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 *

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, start: number };

[number, number];

Installation

Intervals-fn is distributed on the dev and latest channel:

$ npm install intervals-fn@dev --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

Package last updated on 29 Nov 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc