/percentage-value

Percentage converting helper functions

Primary LanguageJavaScript

Percantage-value

Description

Simple percentage calculations.

☁️ Installation

$ npm i --save percent-value

or

<script src="percantage-value.js"></script>

Usage

const percentage = require('percantage-value');

Examples

For calculating how much is a percent of a number, use the of method:

percentage.of(50, 100); // will return 50

If you'd like to calculate percent of a number from another number, use the from method:

percentage.from(70, 100); // will return 70


Enjoy!