soiz1's picture
Upload folder using huggingface_hub
4d70170 verified
raw
history blame contribute delete
435 Bytes
import { onMounted, ref } from 'vue'
import semver from 'semver'
const packageData = ref<any>(null)
export function useVueVersionCheck() {
function getLatestVersion(currentVersion: string): string {
if (packageData.value && packageData.value.versions) {
return semver.maxSatisfying(Object.keys(packageData.value.versions), `^${currentVersion}`)
}
return currentVersion
}
return {
getLatestVersion,
}
}