2.0.0 • Published 9 years ago

to-decimal v2.0.0

Weekly downloads
61
License
MIT
Repository
github
Last release
9 years ago

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