@hrefcl/apidoc - v4.0.5
    Preparing search index...

    Exports

    • Parse

      Parameters

      • content: string

        Raw version string from the

      Returns { version: string }

      Object containing the validated version string, or null if content is empty

      tag to extract and validate semantic version

      Processes

      tags by trimming whitespace and validating the version string against semantic versioning standards. This ensures consistent version formatting across all API documentation and enables version comparison features.

      tag

      When the version string doesn't follow semver format

      // Input: "1.2.3"
      // Output: { version: "1.2.3" }
      // Input: "2.0.0-beta.1"
      // Output: { version: "2.0.0-beta.1" }
      // Input: "v1.2"
      // Throws: ParameterError with usage examples
      // Input: "   "
      // Output: null

      4.0.0