npm.io
2.0.0 • Published 11 years ago

to-decimal

Licence
MIT
Version
2.0.0
Deps
0
Vulns
0
Weekly
0

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

Keywords