to-decimal

2.0.0 • Public • Published

to-decimal Build Status

Convert percent to decimal

Install

$ npm install --save to-decimal

Usage

var toDecimal = require('to-decimal');
 
toDecimal(65);
//=> 0.65
 
toDecimal(1234.50, {digits: 1});
//=> 12.3

toDecimal(value, options)

Returns a number.

value

Required
Type: number

Value to convert.

options

Type: object

Options to pass.

options.digits

Type: number

Number of digits after the decimal point.

License

MIT © Andreas Gillström

Package Sidebar

Install

npm i to-decimal

Weekly Downloads

254

Version

2.0.0

License

MIT

Last publish

Collaborators

  • gillstrom