Skip to content

isValidTagName ​

Determine whether a tag name is valid, meaning that (when prefixed with refs/tags/) that it is a valid reference name, and that any additional tag name restrictions are imposed (eg, it cannot start with a -).

Signature ​

ts
function isValidTagName(tagName: string): boolean;

Parameters ​

  • tagNamerequired · string

    Tag name to check if it is valid.

Returns ​

  • boolean

    Returns true if tag name is valid.

Released under the MIT License.