pepega
This commit is contained in:
parent
9d9d655e8c
commit
cbaaa29b43
22
addons/utils.js
Normal file
22
addons/utils.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
module.exports = {
|
||||||
|
shitFormat: obj => {
|
||||||
|
if (!obj) return console.log(obj, "\n");
|
||||||
|
const keys = Object.keys(obj);
|
||||||
|
const vals = Object.values(obj);
|
||||||
|
|
||||||
|
keys.forEach((key, i) => {
|
||||||
|
let output = vals[i];
|
||||||
|
if (typeof output === "object") output = "object";
|
||||||
|
console.log(key, output);
|
||||||
|
});
|
||||||
|
console.log("");
|
||||||
|
},
|
||||||
|
|
||||||
|
formatCas: c => {
|
||||||
|
const h = Math.floor(c / 3600);
|
||||||
|
const m = Math.floor(c % 3600 / 60);
|
||||||
|
const s = Math.floor(c % 3600 % 60);
|
||||||
|
|
||||||
|
return `${h} hodin ${m} mynut a ${s} se kund`;
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
x
Reference in New Issue
Block a user