- Simple, easily understood API
- Convert to and from arbitrary units
- Uses BigNumber for math: avoiding inexplicable floating-point math errors
- Does not come with awareness of anything by default, you have to teach it whatever conversions you care about
var catalytic =var converter = catalyticconverter // => 2converter // => 1.8converter // => "2 x case (50lb)"converter // => 100converter // "250 x lb"
If you're converting from/to
null, we assume you're converting
from/to the base unit (i.e., not changing anything):
converter // => 100converter // => "100 x lb"converter // => 10converter // => "10 x lb"
There's also some basic methods for easy conversion without an object:
catalytic // => 50catalytic // => 5
If you're going to add a PR, please write a test too. They live in the
directory. To run all tests:
To compile the
src directory to
npm run build