mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
utils: remove the unused objectToArray util
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user