Releases: ericman314/UnitMath
Releases · ericman314/UnitMath
v1.0.0
V1 is a major rewrite of UnitMath in TypeScript. While most of the API remains the same, V1 does introduce several breaking changes from v0.8.7. See Migrating to v1 for details.
toString
no longer simplifies units. You must now explicitly callsimplify
for the unit to be simplified.- Removed
simplify
andsimplifyThreshold
options. - Removed
definitions.quantities
anddefinitions.baseQuantities
. - Renaned
definitions.unitSystems
todefinitions.systems
- Renamed
definitions.prefixes
todefinitions.prefixGroups
- Each system defined in
definitions.systems
is now just a string array of units assigned to that system. - Removed
autoAddToSystem
option, since it is now much easier to add units to a system. - Customer formatters no longer accept additional user arguments.
v1.0.0-rc.1
- Convert to TypeScript
- Removed concept of "quantities" and "base quantities"
- Simplified how systems are defined and used in formatting
- Simpler way to define units
- Renamed many variables and API functions to make their meaning less ambiguous
- Updated README.md
v0.8.6
- Standardized on US customary fluid volumes
- Corrected values for
teaspoon
andfluidounce
v0.8.5
compare
now handles NaNs consistently
v0.8.4
- Added
prefixesToChooseFrom
option - Bugfix when auto-prefixing negative numbers
v0.8.3
split
now supports custom types
v0.8.2
- Fixed unit complexity calculation for deciding whether to simplify units
- Added undocumented second parameter to
conv
function, which could be removed at any time
v0.8.1
- Format function can now be used with number or custom types
- Now supports passing parameters to custom format function
v0.8.0
- Added
getValue
,getNormalizedValue
, andsetNormalizedValue
- Added format option for custom types
v0.7.0
- Added compare