number
number copied to clipboard
Add an option to number_to_human for short labels
The labels are currently hardcoded to Thousand, Million, Billion, Trillion, or Quadrillion. It would be nice to be able to pass a list of these yourself as one of the options, similar to how millify does it. For example:
iex> Number.Human.number_to_human(1440000, units: ["B", "KB", "MB", "GB", "TB"])
1.44 MB