Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anselan/maprange

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anselan/maprange - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

2

package.json
{
"name": "@anselan/maprange",
"version": "0.3.1",
"version": "0.3.2",
"description": "Map values from one range to another",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -9,2 +9,15 @@ # Map Range in JS

## Usage
### Essentially:
> **remap (value, inputRange, targetRante, clamp)**
...where the parameters are:
* `value`: a number
* `inputRange`, `targetRange`: arrays of exactly 2 elements each, i.e `[min,max]`
* `clamp` (optional; default `false`): whether to constrain the result within the given target range
### Description
Provide the range (`inputMin`, `inputMax`) that your `value` is currently in, and specify a new range (`outputMin`, `outputMax`) and you'll get back a new value as per the target range.
## Installation

@@ -24,15 +37,2 @@ ```

## Usage
### Essentially:
> **remap (value, inputRange, targetRante, clamp)**
...where the parameters are:
* `value`: a number
* `inputRange`, `targetRange`: arrays of exactly 2 elements each, i.e `[min,max]`
* `clamp` (optional; default `false`): whether to constrain the result within the given target range
### Description
Provide the range (`inputMin`, `inputMax`) that your `value` is currently in, and specify a new range (`outputMin`, `outputMax`) and you'll get back a new value as per the target range.
## Useful example applications

@@ -39,0 +39,0 @@ ### Percentages

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc