oft/module/utils/isBetweenVersions.mjs
2025-11-22 15:46:30 -07:00

18 lines
334 B
JavaScript

export function isBetweenVersions(min, target, max) {
if (min) {
const isOlderThanMin = foundry.utils.isNewerVersion(min, target);
if (isOlderThanMin) {
return false;
};
};
if (max) {
const isNewerThanMax = foundry.utils.isNewerVersion(target, max);
if (isNewerThanMax) {
return false;
};
};
return true;
};