Repository navigation
v5.31.0
v5.31.0 (Minor Release)
Status: Released
This is a new minor release of the @alextheman/utility package. It introduces new features and other backwards-compatible changes that should require little to no refactoring. Please read the description of changes below.
Description of Changes
- Add the following methods to
VersionNumberto help with version comparison.compare- a static method that takes twoVersionNumberinstances and returns:0if both are equal.1if the first is greater than the second.-1if the first is less than the second.
isGreaterThan- an instance method which returnstrueif the current instance is greater than the input, andfalseotherwise.isLessThan- an instance method which returnstrueif the current instance is less than the input, andfalseotherwise.
- Add support for sorting
VersionNumberinstances tosortBy.- This makes use of the new
comparemethod to allow for easier sorting ofVersionNumberinstances.
- This makes use of the new