
22 Nov
2015
22 Nov
'15
2:03 a.m.
Hi all, New version of my small library prefix-units (for parsing and formatting things like "10K"). Changes: * Incompatible API change to cleanup some initial design decisions: the two level `FormatOption`/`FormatMode` model is removed, the fixed unit of `FormatOption` is moved to a new constructor `FormatMode`, and `FormatOption` is removed entirely. This should be a simpler API, at the cost of breaking compatibility. * Fixed issue #3 (No support for negative numbers). * Worked around issue #1 (Add 'base' unit) by adding a mode that disables scaling; it should have the same effect without introducing an artificial unit. Feedback welcome, either via email or at https://github.com/iustin/prefix-units. happy hacking, iustin