Merged with main

This commit is contained in:
WBHarry 2025-08-22 01:57:54 +02:00
commit e9f7c0c16b
15 changed files with 122 additions and 71 deletions

View file

@ -418,3 +418,14 @@ export async function createEmbeddedItemsWithEffects(actor, baseData) {
export const slugify = name => {
return name.toLowerCase().replaceAll(' ', '-').replaceAll('.', '');
};
export const versionCompare = (current, target) => {
const currentSplit = current.split('.').map(x => Number.parseInt(x));
const targetSplit = target.split('.').map(x => Number.parseInt(x));
for (var i = 0; i < currentSplit.length; i++) {
if (currentSplit[i] < targetSplit[i]) return true;
if (currentSplit[i] > targetSplit[i]) return false;
}
return false;
};