1.0.0 • Published 9 years ago
string-round v1.0.0
round-string
Round numbers with arbitrary precision.
Usage
round('149', 3)
// => 149
round('149', 2)
// => 15
round('149', 1)
// => 1
round('99', 1)
// => throwsInstallation
$ npm install round-stringAPI
round(num, len)
Reasoning
This module operates on strings instead of numbers, because JavaScript numbers don't support arbitrary precision. Strings however can be as long as you want.
License
MIT
1.0.0
9 years ago