New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

range-map

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

range-map

inspired by the **[Map](https://processing.org/reference/map_.html)** function in **[Processing](https://processing.org/)**. This module scales a number from one range to another

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

range-map

inspired by the Map function in Processing. This module scales a number from one range to another

Build Status codecov

Installation

$ npm install range-map

Example Usage

var rangeMap = require('range-map')

var mapped = rangeMap(50, 0, 100, 0, 1000)

//mapped == 500

API

mapped(input, inputLowest, inputHighest, outputLowest, outputHighest)

returns a number that has been rounded with Math.round() The ranges will also work with negative numbers.

Keywords

range

FAQs

Package last updated on 03 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts