A lightweight format for writing numbers using scientific notation.
I wrote this to make it easy to allow applications to accept values with units gracefully. Although many languages implement scientific notation, I never found it as ergonomic as just using SI prefixes. Would you rather a user input a unitless 1.024e+6
or 1_000KiB
?
A SiMin number has three parts: a value, prefix, and unit. Let's look at an example:
tokenize('-120mT') === [ '-120', 'm', 'T' ]