Function patch

Return the patch version number.

patch('1.2.3') // 3
  • Parameters

    • version: string

      version string

    • OptionaloptionsOrLoose: boolean | Options

      an options object { loose } (where loose is the only available option) or a boolean indicating whether to enable loose mode. In loose mode, the parser is more forgiving with imperfectly formatted semver strings

    Returns number

    the patch version number