compare-versions
Version:
Compare semver version strings to find greater, equal or lesser.
8 lines (7 loc) • 359 B
TypeScript
/**
* Allowed arithmetic operators
*/
export type CompareOperator = '>' | '>=' | '=' | '<' | '<=' | '!=';
export declare const semver: RegExp;
export declare const validateAndParse: (version: string) => RegExpMatchArray;
export declare const compareSegments: (a: string | string[] | RegExpMatchArray, b: string | string[] | RegExpMatchArray) => 0 | 1 | -1;