npm

Don't miss out on this year's npm Pride t-shirt designs!Order your favorites here »

tofixed

1.0.0 • Public • Published

toFixed

Converts a number into a string, keeping a specified number of decimals.

MIT License

build:? coverage:?

Install

$ npm install --save tofixed

Usage

var toFixed = require('tofixed');
 
// API
// - toFixed(number, precision)
 
toFixed(5.56789, 2);
// => '5.57'

Note: it will return a fixed number of at most precision digits after the decimal.

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

install

npm i tofixed

Downloadsweekly downloads

362

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability