Skip to content

Build your personal knowledge base with Trilium Notes

add docstring for func

perf3ct0acba0eac4a2
diff --git a/src/public/app/services/utils.js b/src/public/app/services/utils.js
index fcc00229c7..0544c86224 100644
--- a/src/public/app/services/utils.js
+++ b/src/public/app/services/utils.js
@@ -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;
}