useGit API
    Preparing search index...

    Function getTags

    • Retrieves all Git tags from the current repository.

      Parameters

      • prefixes: string[] = []

        Optional list of prefixes to remove or replace from the beginning of each tag

      • to: string = ""

        Replacement value for matched prefixes

        ""
        

      Returns Promise<string[]>

      await getTags();
      // [ 'v0.1.0', 'v0.2.0', 'v0.3.0' ]

      await getTags(['v'], 'version-');
      // ['version-0.1.0', 'version-0.2.0']

      1.0.0