UNPKG

@lou.codes/cron

Version:

⏲️ Cron Quartz and Cron UNIX expression parser

19 lines (18 loc) 607 B
import type { ValueOrRangeField } from "./ValueOrRangeField.js"; /** * Compares `value` to a {@link ValueOrRangeField}. * * @category Internal * @example * ```typescript * compareRangeOrValue(13)({ from: 0, to: 99 }); // true * compareRangeOrValue(13)({ from: 0, to: 10 }); // false * compareRangeOrValue(13)(13); // true * compareRangeOrValue(13)(14); // false * ``` * @param value Value to be compared. * @returns Curried function expecting a {@link ValueOrRangeField}. */ export declare const compareRangeOrValue: ( value: number, ) => (valueOrRange: ValueOrRangeField<number>) => boolean;