# value-map

> Re-maps a number from one range to another.

Latest version **0.0.1** (published 2016-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install value-map
pnpm add value-map
yarn add value-map
bun add value-map
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-04-07 |
| First published | 2016-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tommy |
| Maintainers | tooto1985 |
| Keywords | value, map |

## Links

- npm: https://www.npmjs.com/package/value-map
- Repository: https://github.com/tooto1985/value-map
- Homepage: https://github.com/tooto1985/value-map#readme
- Issues: https://github.com/tooto1985/value-map/issues
- npm.io page: https://npm.io/package/value-map

## Recent versions

- 0.0.1 (latest) — 2016-04-07

## README

value-map
=============================
> Re-maps a number from one range to another.


## Install

```
$ npm install value-map
```

## Documentation

```js
var x = valueMap(value, fromLow, fromHigh, toLow, toHigh)
```

Re-maps a number from one range to another. That is, a value of fromLow would get mapped to toLow, a value of fromHigh to toHigh, values in-between to values in-between, etc.

## Example

```js
var valueMap = require("value-map");

console.log(valueMap(50, 0, 256, 0, 1024));
//=> 200

console.log(valueMap(125, 400, 0, 0, 200));
//=> 137.5
```

## License

This code is licensed under the MIT License.

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