-
Notifications
You must be signed in to change notification settings - Fork 6
Todo
Drop travis ci, set up gh actions
"Converts" -> Abbreviates
Add rounding example:
// it truncates/floors numbers by default
console.log(approx(999999));
//> 999k
// set round: true to round instead of truncate
console.log(approx(1234, {round: true}));
//> 1m
Maybe add a few more examples with each config option
Support quadrillions, quintillions, etc. https://github.com/nfriedly/approximate-number/issues/26
reverse function: 10m => 10000000 - https://stackoverflow.com/q/37925968/933879
binary option - bits and bytes, powers of 2, use gigabyte, terabyte, petabyte, etc
full word option - how to handle translation / locale? - https://github.com/nfriedly/approximate-number/issues/14 - Look at getCompactNumberInstance
from https://developer.android.com/reference/java/text/NumberFormat.html
switch to esm - https://github.com/nfriedly/approximate-number/issues/22 - probably make it v3 and recommend that folks do require('approximate-number').default
for cjs (or stick with v2)
option to use .toLocalString() with a passed in local to automatically handle the decimal and place value - https://github.com/nfriedly/approximate-number/issues/17
drop min10K in favor of a customizable minimum. Could use the reverse function to accept strings like 10k!