add docstring for func

This commit is contained in:
perf3ct 2024-11-09 22:23:02 +00:00
parent 48d53e276e
commit 0acba0eac4
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -569,6 +569,12 @@ function compareVersions(v1, v2) {
return 0;
}
/**
* Compares two semantic version strings and returns `true` if the latest version is greater than the current version.
* @param {string} latestVersion
* @param {string} currentVersion
* @returns {boolean}
*/
function isUpdateAvailable(latestVersion, currentVersion) {
return compareVersions(latestVersion, currentVersion) > 0;
}