-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional options parameter #3
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for the PR. Having skimmed the changes, they look good, and they include docs changes which is great. Would you be able to add some tests? Also, for the most part, IIRC (it's been a while) this library is supposed to be largely bidirectional except for some unavoidable edge cases. That is, the output of Finally, do you mind if I ask what you're using this for? It's been so long since I thought about this library, I'm almost surprised anybody is using it! |
Certainly, I'll add tests and add the reverse |
Create test.txt
Added an extra optional parameter to the main
formatSI
function to allow 3 extra options:space
: adds a space between number and prefix (ex.1.2 k
)plusMinus
: prepends a +/- sign (ex.+1.2k
)suffix
: appends a string suffix for units (ex.1.2kWh
)