1.0.4 • Published 6 years ago
percentage-value v1.0.4
Percantage-value
Description
Simple percentage calculations.
:cloud: 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!