measurement-unit

A collection of measurement units for easy conversion and typed code (Weight, Volume, Length, Time, Speed & more!)

MIT License

Downloads
7.5K
Stars
10
Committers
1

Bot releases are visible (Hide)

measurement-unit - v1.3.0 Addition of Knot unit and conversions Latest Release

Published by PrinsFrank 3 months ago

What's Changed

Other changes

New Contributors

Full Changelog: https://github.com/PrinsFrank/measurement-unit/compare/v1.2.0...v1.3.0

measurement-unit - v1.2.0 toUnit method is now public to allow for dynamic conversion

Published by PrinsFrank 12 months ago

What's Changed

Full Changelog: https://github.com/PrinsFrank/measurement-unit/compare/v1.1.0...v1.2.0

measurement-unit - v1.1.0 Kilometer added

Published by PrinsFrank about 1 year ago

measurement-unit - v1.0.0 - First stable release

Published by PrinsFrank almost 2 years ago

Features

  • Added time measurement units (Day, Hour, Minute, Second)
  • Added torque (NewtonMeter)
  • Decreased package download size by configuring gitattributes
  • This package is now fully covered with unit tests.

Breaking changes for custom units

  • The from(...)Value methods on the different classes return type changed from float to self.
  • The to(...)Value methods on the different classes are not static anymore, and their parameters have been removed. For conversions, the internal properties of the classes can be used.

Bugfixes

  • Several conversion factors for measurement units were inversed, resulting in incorrect conversions. These were uncovered during adding tests and fixed. (StatuteMile, Mile/SurveyMile, Thou)

Full Changelog: https://github.com/PrinsFrank/measurement-unit/compare/v0.1...v1.0

measurement-unit - v0.1 Initial release

Published by PrinsFrank almost 2 years ago