mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Using foundry's isNewer function rather than custom one
This commit is contained in:
parent
482adabae4
commit
9b332c3681
3 changed files with 4 additions and 17 deletions
|
|
@ -420,14 +420,3 @@ 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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue