Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

scalemap

rooch8412MIT1.0.1

Converts a value from one scale to another.

Scale, conversion, map

readme

scalemap

An npm package for converting a value from one scale to another.

Installation

npm install scalemap

Usage

var map = require('scalemap');

var val = map(0.5, 0, 1, 0, 2);

Output should be 1.

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.