# math-interval-parser

> Parse math interval

Latest version **2.0.1** (published 2019-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install math-interval-parser
pnpm add math-interval-parser
yarn add math-interval-parser
bun add math-interval-parser
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2019-01-09 |
| First published | 2015-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Dmitry Semigradsky |
| Maintainers | semigradsky |
| Keywords | mathematics, interval, math, parse, parsing |

## Links

- npm: https://www.npmjs.com/package/math-interval-parser
- Repository: https://github.com/Semigradsky/math-interval-parser
- Homepage: https://github.com/Semigradsky/math-interval-parser#readme
- Issues: https://github.com/Semigradsky/math-interval-parser/issues
- npm.io page: https://npm.io/package/math-interval-parser

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2019-01-09
- 2.0.0 — 2017-06-23
- 1.1.0 — 2015-04-05
- 1.0.0 — 2015-02-17

## README

# Math interval parser
[![Build Status](https://travis-ci.org/Semigradsky/math-interval-parser.svg)](https://travis-ci.org/Semigradsky/math-interval-parser) [![Dependency Status](https://david-dm.org/Semigradsky/math-interval-parser.svg)](https://david-dm.org/Semigradsky/math-interval-parser) [![Coverage Status](https://coveralls.io/repos/Semigradsky/math-interval-parser/badge.svg)](https://coveralls.io/r/Semigradsky/math-interval-parser)

> Parse math interval. Notation is accepted as part of [ISO 31-11](http://en.wikipedia.org/wiki/ISO_31-11).


## Install

```sh
$ npm install --save math-interval-parser
```


## Usage

```js
import intervalParse from 'math-interval-parser';
// or `var intervalParse = require('math-interval-parser').default;

intervalParse('(-10,20.2]'); // or intervalParse(']-10,20.2]');
//=> {
//=>     from: {
//=>         value: -10,
//=>         included: false,
//=>     },
//=>     to: {
//=>         value: 20.2,
//=>         included: true
//=>     }
//=> }

intervalParse('[1e3,)'); // or intervalParse('[1e3,Infinity)');
//=> {
//=>     from: {
//=>         value: 1000,
//=>         included: true,
//=>     },
//=>     to: {
//=>         value: Infinity,
//=>         included: false
//=>     }
//=> }
```

See tests for more details.


## License

MIT © Dmitry Semigradsky

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