version-compare
Version:
Comparator to determine if a version is less than, equivalent to, or greater than another version
14 lines • 554 B
TypeScript
export type Version = string | number;
export declare enum VersionIs {
LessThan = -1,
EqualTo = 0,
GreaterThan = 1
}
/**
* Compare two versions quickly.
* @param current Is this version greater, equal to, or less than the other?
* @param other The version to compare against the current version
* @returns 1 if current is greater than other, 0 if they are equal or equivalent, and -1 if current is less than other
*/
export default function versionCompare(current: Version, other: Version): VersionIs;
//# sourceMappingURL=index.d.ts.map