0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 21:48:32 +00:00
renovatebot_renovate/lib/modules/versioning/ruby/operator.ts
Rhys Arkins dca3418bbd refactor: lib/modules (#14488)
Moves datasource, manager, platform and versioning code from lib/ into new lib/modules/

BREAKING CHANGE: External tools must update paths to datasource, manager, platform and versioning
2022-03-04 09:04:02 +01:00

29 lines
486 B
TypeScript

const EQUAL = '=';
const NOT_EQUAL = '!=';
const GT = '>';
const LT = '<';
const GTE = '>=';
const LTE = '<=';
const PGTE = '~>';
const SINGLE = [EQUAL];
const ALL = [EQUAL, NOT_EQUAL, GT, LT, GTE, LTE, PGTE];
const isValidOperator = (operator: string): boolean => ALL.includes(operator);
const isSingleOperator = (operator: string): boolean =>
SINGLE.includes(operator);
export {
EQUAL,
NOT_EQUAL,
GT,
LT,
GTE,
LTE,
PGTE,
isValidOperator,
isSingleOperator,
};