Convert a decimal proportion to a percentage string
Converts any valid decimal value to a percentage string with no rounding or range limitations.
$ npm install --save decimal-to-percent
var toPercent = require('decimal-to-percent')
toPercent(0.1)
//=> 10%
toPercent(-0.1)
//=> -10%
toPercent(0.001)
//=> 0.1%
Required
Type: number
Any valid number between -Infinity
and Infinity
, exclusive.
MIT © Ben Drucker