npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

@pelevesque/scale-number

0.0.6 • Public • Published

Build Status Coverage Status JavaScript Style Guide

scale-number

Scales a number within a range.

Node Repository

https://www.npmjs.com/package/@pelevesque/scale-number

Installation

npm install @pelevesque/scale-number

Tests

Standard Style & Unit Tests

npm test

Unit Tests & Coverage

npm run cover

Usage

const scaleNumber = require('@pelevesque/scale-number')
const num = 10
const oldRangeMin = 0
const oldRangeMax = 100
const newRangeMin = 0
const newRangeMax = 1000
const result = scaleNumber(num, oldRangeMin, oldRangeMax, newRangeMin, newRangeMax)
// result === 100

install

npm i @pelevesque/scale-number

Downloadsweekly downloads

18

version

0.0.6

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability