Function formatRange

  • Formats the SemVerrange into a string.

    Parameters

    • range: Range

      The range to format

    Returns string

    A string representation of the SemVer range

    import { formatRange, parseRange } from "@std/semver";
    import { assertEquals } from "@std/assert";

    const range = parseRange(">=1.2.3 <1.2.4");
    assertEquals(formatRange(range), ">=1.2.3 <1.2.4");