utils: remove the unused objectToArray util

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2025-05-15 18:23:24 +03:00
committed by GitHub
parent 58c692ca5e
commit c03c740710

View File

@@ -59,20 +59,6 @@ function unescapeHtml(text) {
);
}
// Helper function for converting Objects to Arrays after sorting the keys
function objectToArray(obj) {
const arr = [];
const idx = [];
const sortedKeys = Object.keys(obj).sort((a, b) => a - b);
for (const key of sortedKeys) {
arr.push(obj[key]);
idx.push(key);
}
return [idx, arr];
}
function padNumber(num) {
return ("00" + num).substr(-2, 2);
}
@@ -720,7 +706,6 @@ globalThis.utils = (function () {
return {
escapeHtml,
unescapeHtml,
objectToArray,
padNumber,
showAlert,
datetime,