# get-value-in-range

> Calculate range adjusted values

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

## Install

```sh
npm install get-value-in-range
pnpm add get-value-in-range
yarn add get-value-in-range
bun add get-value-in-range
```

## 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.2 |
| Published | 2016-12-01 |
| First published | 2015-12-27 |
| 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/get-value-in-range
- Repository: https://github.com/flipactual/get-value-in-range
- Homepage: https://github.com/flipactual/get-value-in-range#readme
- Issues: https://github.com/flipactual/get-value-in-range/issues
- npm.io page: https://npm.io/package/get-value-in-range

## Recent versions

- 2.0.2 (latest) — 2016-12-01
- 2.0.1 — 2016-11-30
- 2.0.0 — 2016-11-30
- 1.0.9 — 2016-11-29
- 1.0.8 — 2016-11-29
- 1.0.7 — 2016-11-29
- 1.0.5 — 2016-11-29
- 1.0.3 — 2016-11-29
- 1.0.2 — 2016-11-28
- 1.0.1 — 2016-11-28
- 1.0.0 — 2015-12-27

## README

# get-value-in-range

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

Calculate range adjusted values

<a name="getValueInRange"></a>

## getValueInRange(value, values) ⇒ <code>number</code>
Find the position of the value within a range where 0 is the minimum value
and 1 is the maximum value.

**Kind**: global function  
**Returns**: <code>number</code> - The position of the value within the range  

| Param | Type | Description |
| --- | --- | --- |
| value | <code>number</code> | The value to place within the range |
| values | <code>number</code> | All of the values necessary to calculate the range |

**Example**  
```js
getValueInRange(7.5, [10, 5]);
// → 0.5
```

## Scripts

### `test` – run the tests

```sh
npm run test
```

### `lint` – lint the codebase

```sh
npm run lint
```

### `readme` – generate the README

```sh
npm run readme
```

## License

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

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