mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-26 15:55:35 +02:00
add card to inform user of new versions
This commit is contained in:
@@ -118,3 +118,12 @@ export function saveDirectoryPreview(
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
export function semverIsGreater(a: string, b: string) {
|
||||
return a.localeCompare(b, undefined, { numeric: true }) === 1;
|
||||
}
|
||||
export function isSemver(str: string) {
|
||||
return str.match(
|
||||
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user