Function minor

Return the minor version number.

minor('1.2.3') // 2
  • 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 minor version number