# is-equal-enough

> Determine whether values are within a tolerance of each other

Latest version **4.0.4** (published 2016-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-equal-enough
pnpm add is-equal-enough
yarn add is-equal-enough
bun add is-equal-enough
```

## 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 | 4.0.4 |
| Published | 2016-12-01 |
| First published | 2015-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Flip |
| Maintainers | flipactual |

## Links

- npm: https://www.npmjs.com/package/is-equal-enough
- Repository: https://github.com/flipactual/is-equal-enough
- Homepage: https://github.com/flipactual/is-equal-enough#readme
- Issues: https://github.com/flipactual/is-equal-enough/issues
- npm.io page: https://npm.io/package/is-equal-enough

## Recent versions

- 4.0.4 (latest) — 2016-12-01
- 4.0.3 — 2016-11-29
- 4.0.2 — 2016-11-29
- 4.0.1 — 2016-11-29
- 4.0.0 — 2016-11-29
- 3.0.6 — 2016-11-29
- 3.0.5 — 2016-11-29
- 3.0.4 — 2016-11-28
- 3.0.3 — 2016-11-17
- 3.0.2 — 2016-11-17
- 3.0.1 — 2015-12-27
- 3.0.0 — 2015-12-19

## README

# is-equal-enough

[![flipactual](https://img.shields.io/badge/😋-flipactual-218AC7.svg?style=flat-square)](https://www.flipactual.com/)
[![Travis](https://img.shields.io/travis/flipactual/is-equal-enough.svg?style=flat-square)](https://travis-ci.org/flipactual/is-equal-enough/)
[![Codecov](https://img.shields.io/codecov/c/github/flipactual/is-equal-enough.svg?style=flat-square)](https://codecov.io/gh/flipactual/is-equal-enough/)
[![Node](https://img.shields.io/node/v/is-equal-enough.svg?style=flat-square)](http://npmjs.com/package/is-equal-enough)
[![NPM](https://img.shields.io/npm/v/is-equal-enough.svg?style=flat-square)](http://npmjs.com/package/is-equal-enough)

Determine whether values are within a tolerance of each other

<a name="isEqualEnough"></a>

## isEqualEnough(a, b, [tolerance]) ⇒ <code>boolean</code>
Determine whether two numbers are within a provided tolerance of each other.

**Kind**: global function  
**Returns**: <code>boolean</code> - Whether the numbers are within the tolerance or not.  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| a | <code>number</code> |  | A number |
| b | <code>number</code> |  | Another number |
| [tolerance] | <code>number</code> | <code>Number.EPSILON</code> | The acceptable tolerance. |

**Example**  
```js
isEqualEnough(0.15 + 0.15, 0.1 + 0.2);
// → true
```

## Scripts

### `test` – run the tests

```sh
npm run test
```

### `coverage` – generate and view code coverage as HTML

```sh
npm run coverage
```

### `lint` – lint the codebase

```sh
npm run lint
```

### `readme` – generate the README

```sh
npm run readme
```

### `compile` – compile the code

```sh
npm run compile
```

## License

MIT @ [Flip](https://github.com/flipactual)

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