An npm package for converting a value from one scale to another.
npm install scalemap
var map = require('scalemap');
var val = map(0.5, 0, 1, 0, 2);
Output should be 1.
npm test
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.