feat: check for updates
This commit is contained in:
1 parent
6bfe2a6306
commit
759883a4c8
8 files changed
+91
-14
No files matched your search
@@ -101,11 +101,10 @@ export const copyToClipboard = (text) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const checkVersion = (required, current) => {
|
||||
// Returns true when current version is below required
|
||||
export const compareVersion = (latest, current) => {
|
||||
return current === '0.0.0'
|
||||
? false
|
||||
: current.localeCompare(required, undefined, {
|
||||
: current.localeCompare(latest, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: 'case',
|
||||
caseFirst: 'upper'
|
||||
|
||||
Reference in new issue
Block a user