Skip to content

v5.31.0

Choose a tag to compare

@alex-up-bot alex-up-bot released this 24 Oct 15:25

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 VersionNumber to help with version comparison.
    • compare - a static method that takes two VersionNumber instances and returns:
      • 0 if both are equal.
      • 1 if the first is greater than the second.
      • -1 if the first is less than the second.
    • isGreaterThan - an instance method which returns true if the current instance is greater than the input, and false otherwise.
    • isLessThan - an instance method which returns true if the current instance is less than the input, and false otherwise.
  • Add support for sorting VersionNumber instances to sortBy.
    • This makes use of the new compare method to allow for easier sorting of VersionNumber instances.