logical.compareSemverfunctionno test imports itfunction compareSemver(a: string, b: string): -1 | 0 | 1-1, 0 or 1 as a is before, the same as, or after b; a text that is not a version is before every version.
The order of versions (commons repoctl 0004-repoctl-status-release FR-001): the greatest of some versions of Semantic Versioning, by their numbers, a pre-release coming before the same numbers without one. Pure.
import { compareSemver, greatest } from "./semver.ts";
compareSemver("0.10.0", "0.9.9"); // 1
greatest(["1.0.0-rc.1", "1.0.0", "0.9.0"]); // "1.0.0"logical.compareSemverfunctionno test imports itfunction compareSemver(a: string, b: string): -1 | 0 | 1-1, 0 or 1 as a is before, the same as, or after b; a text that is not a version is before every version.
logical.greatestfunctionno test imports itfunction greatest(versions: readonly string[]): string | undefinedThe greatest of some versions, or undefined where there are none.
compareSemverfunctionfunction compareSemver(a: string, b: string): -1 | 0 | 1-1, 0 or 1 as a is before, the same as, or after b; a text that is not a version is before every version.
greatestfunctionfunction greatest(versions: readonly string[]): string | undefinedThe greatest of some versions, or undefined where there are none.