npm install calc-percent> Calculate percentage
``bash`
$ npm install --save calc-percent
`js
var calcPercent = require('calc-percent');
calcPercent(10, 50);
//=> 20
calcPercent(10, 50, {suffix: '%'});
//=> 20%
calcPercent(100 / 3, 100, {decimal: 2});
//=> 33.33
`
#### val
Type: number
Value which should be calculated.
#### total
Type: number
Total that val should be compared against.
#### opts.decimal
Type: number 0
Default:
Number of decimals.
#### opts.suffix
Type: string`
Append a suffix.
MIT © Kevin Mårtensson