UNPKG

renovate

Version:

Automated dependency updates. Flexible so you don't need to be.

16 lines (15 loc) 600 B
import { getRegexOrGlobPredicate } from "../string-match.js"; import { Matcher } from "./base.js"; import { isUndefined } from "@sindresorhus/is"; //#region lib/util/package-rules/current-value.ts var CurrentValueMatcher = class extends Matcher { matches({ currentValue }, { matchCurrentValue }) { if (isUndefined(matchCurrentValue)) return null; const matchCurrentValuePred = getRegexOrGlobPredicate(matchCurrentValue); if (!currentValue) return false; return matchCurrentValuePred(currentValue); } }; //#endregion export { CurrentValueMatcher }; //# sourceMappingURL=current-value.js.map