ULOS Manual Pages - semver(3) | Back
NAME
  semver - semantic versioning parser
DESCRIPTION
  semver is a fairly strict parser for semantic versioning 2.0.0.  A brief summary of the semantic versioning specification, as taken from https://semver.org/spec/v2.0.0.html:
    Given a version number MAJOR.MINOR.PATCH, increment the:
      1. MAJOR version when you make incompatible API changes;
      2. MINOR version when you add functionality in a backwards compatible manner, and
      3. PATCH version when you make backwards compatible bug fixes.
    Addiional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
  The basic format for a semver-compliant version is
    MAJOR.MINOR.PATCH-pre-release information+build metadata.  The pre-release information and build metadata fields are optional.
FUNCTIONS
  Following Lua convention, functions will in the case of failure return nil and a string describing the error.
  Several functions in the semver library expect one or more version objects as an argument.
  
  version object format:
    A version object is a table with the following fields (entries surrounded with square brackets [] are optional.
      {
        major = number,
        minor = number,
        patch = number,
        [prerelease = string or table,]
        [build = string or table]
      }
  build(version): string
    Converts the provided version into a human-readable string form.  If the prerelease or build fields are a table, they will be concatenated with a ".".  In all cases, if present and not empty, they will be concatenated to the end of the returned version string following their corresponding separator (- for pre-release information, and + for build metadata).
  parse(version:string): version
    Deconstructs the provided version string, and returns a version object matching it.  If no prerelease or build information is abailable, the corresponding tables will be empty.
  isGreater(ver1:version, ver2:version): boolean
    Checks whether the provided ver1 is greater than the provided ver2 and returns a boolean accordingly.
COPYRIGHT
  Semantic version parsing library copyright (c) 2021 Ocawesome101 under the DSlv2.  Semantic versioning specification copyright (c) Tom Preston-Werner under Creative Commons -- CC BY 3.0.
REPORTING BUGS
  Please report bugs with the semver library at https://github.com/ocawesome101/oc-ulos/issues.  Leave feedback on semantic versioning at https://github.com/semver/semver/issues.