From 81f3dfe33893f70a55e8f557abd5374c65c7b911 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Mon, 29 Apr 2024 09:35:01 +0800 Subject: [PATCH] Describe the return values of comparisons --- scripts/secretariat.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/secretariat.js b/scripts/secretariat.js index 8026bfe..b7ef832 100644 --- a/scripts/secretariat.js +++ b/scripts/secretariat.js @@ -377,10 +377,11 @@ class session { store(DATA[`inject`]); } - /* Compare a data against the stored data. Useful when comparing dictionaries. + /* Compare a data against the stored data. Useful when comparing dictionaries. @param {string} PATH the name @param {object} DATA the data to compare to + @return {boolean} the result: true is when the data is the same, false otherwise */ static async compare(PATH, DATA) { /* The actual comparison of data. */ @@ -404,13 +405,21 @@ class session { } } -/* Compare a data against the stored data. Useful when comparing dictionaries. +/* +Compare a data against the stored data. Useful when comparing dictionaries. @param {string} PATH the name @param {object} DATA the data to compare to +@return {boolean} the result: true is when the data is the same, false otherwise */ export async function compare(PATH, DATA) { - /* The actual comparison of data. */ + /* + Compare the data. + + @param {object} DATA_ONE the first data + @param {object} DATA_TWO the second data + @return {boolean} the result + */ async function comparison(DATA_ONE, DATA_TWO) { let RESULT = true;