@eagleoutice/flowr - v2.13.1
    Preparing search index...
    RVersion: {
        compare(
            this: void,
            a: string | undefined,
            b: string | undefined,
        ): number;
        highest(this: void, versions: Iterable<string>): string | undefined;
        parse(this: void, version: string): RVersion | undefined;
        parseOrZero(this: void, version: string): RVersion;
    }

    Helpers for R package versions (1.2-3 style), which are freer than SemVer.

    Type Declaration

    • compare: function
      • Compare two R version strings following R's numeric_version scheme: split on . and -, compare numerically, shorter versions padded with zeros (0.4-9 < 0.4.10 < 1.0). Negative/zero/positive for a less than/equal to/greater than b.

        Parameters

        • this: void
        • a: string | undefined
        • b: string | undefined

        Returns number

    • highest: function
      • The highest of some version strings by R's numeric_version order (0.9.0 < 0.10.0); undefined if none.

        Parameters

        • this: void
        • versions: Iterable<string>

        Returns string | undefined

    • parse: function
      • Parse an R version string into a SemVer, normalizing R's freer scheme (e.g. 0.4-9). Unlike new SemVer(version) this coerces where needed; the original string is available via .str. Returns undefined (never throws) when the string cannot be coerced to a version at all.

        Parameters

        • this: void
        • version: string

        Returns RVersion | undefined

    • parseOrZero: function
      • Like parse but never undefined: a truly un-coercible version sorts as 0.0.0 while keeping its original string as .str, so it stays usable as a sort key.

        Parameters

        • this: void
        • version: string

        Returns RVersion