This package has been deprecated

Author message:

use decimal-to-percent instead, it now supports es5

decimal-to-percent-es5

1.0.0 • Public • Published

decimal-to-percent Build Status

Convert a decimal proportion to a percentage string

Converts any valid decimal value to a percentage string with no rounding or range limitations.

Install

$ npm install --save decimal-to-percent

Usage

var toPercent = require('decimal-to-percent')

toPercent(0.1)
//=> 10%

toPercent(-0.1)
//=> -10%

toPercent(0.001)
//=> 0.1%

API

toPercent(decimal) -> string

decimal

Required
Type: number

Any valid number between -Infinity and Infinity, exclusive.

License

MIT © Ben Drucker

Dependencies (2)

Dev Dependencies (2)

Package Sidebar

Install

npm i decimal-to-percent-es5

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • hanford