Socket
Socket
Sign inDemoInstall

convert-range

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-range

> Converts number from one range to another


Version published
Maintainers
1
Created
Source

convert-range

Converts number from one range to another

Installation

$ npm install convert-range

Usage

Examples:

const convertRange = require('convert-range');

convertRange(3000, [0, 5000], [2500, 10000]); // 7000
convertRange(0.6665, {min: 0, max: 1}, {min: 1000, max: 5000}); // 3666

convertRange(3, [1, 10], [0, window.innerWidth]);

License

MIT

Keywords

FAQs

Package last updated on 09 Jan 2024

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

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