# intervals-fn

> Manipulate intervals in a functional way

Latest version **3.0.3** (published 2018-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install intervals-fn
pnpm add intervals-fn
yarn add intervals-fn
bun add intervals-fn
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2018-06-27 |
| First published | 2017-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 53.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Maintainers | draeken |
| Keywords | interval, range, intersection, union, subtraction, typescript |

## Links

- npm: https://www.npmjs.com/package/intervals-fn
- Repository: https://github.com/js-republic/intervals-fn
- Homepage: https://github.com/js-republic/intervals-fn#readme
- Issues: https://github.com/js-republic/intervals-fn/issues
- npm.io page: https://npm.io/package/intervals-fn

## Dependencies (1)

- [ramda](https://npm.io/package/ramda.md) ^0.25.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.0.3 (latest) — 2018-06-27
- 2.5.2 (dev) — 2017-12-04
- 3.0.2 — 2018-06-26
- 3.0.1 — 2018-06-26
- 3.0.0 — 2018-06-22
- 2.8.4 — 2018-05-21
- 2.8.3 — 2018-05-18
- 2.8.2 — 2018-04-26
- 2.8.1 — 2018-04-26
- 2.8.0 — 2018-04-26
- 2.7.0 — 2018-04-20
- 2.6.0 — 2018-01-08
- 2.5.1 — 2017-11-29
- 2.5.0 — 2017-11-29
- 2.4.1 — 2017-11-27
- … 8 more at https://npm.io/package/intervals-fn/versions

## README

# Intervals-fn

> Enable manipulation on interval object.

[![Build Status](https://travis-ci.org/js-republic/intervals-fn.svg?branch=master)](https://travis-ci.org/js-republic/intervals-fn)
[![Maintainability](https://api.codeclimate.com/v1/badges/b6bcf985d873503648a0/maintainability)](https://codeclimate.com/github/js-republic/intervals-fn/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/b6bcf985d873503648a0/test_coverage)](https://codeclimate.com/github/js-republic/intervals-fn/test_coverage)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![npm version](https://badge.fury.io/js/intervals-fn.svg)](https://badge.fury.io/js/intervals-fn)

## 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](https://en.wikipedia.org/wiki/Allen%27s_interval_algebra))
* After
* Before
* During
* Ending
* Equal
* Meeting
* Overlapping *
* Starting

## Accepted input
Functions marked with `*` both accept interval and Array/ReadonlyArray of interval

```typescript
{ start: number, end: number };

{ from: number, to: number };

[number, number];
```

## Installation

Intervals-fn is distributed on the latest channel:

```bash
$ npm install intervals-fn --save
```

## Advenced docs

Visit the homepage for an extensive API documentation:<br>
[https://js-republic.github.io/intervals-fn](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](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). You can use [cz-cli](https://github.com/commitizen/cz-cli) to format your commit.

---
_Source: https://npm.io/package/intervals-fn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
