Skip to content

Commit

Permalink
feat: simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Dec 6, 2023
1 parent bdd228c commit 48df2f2
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ const storage = (table) => {
const has = (key) => Object.keys(get()).includes(key);

return {
get: get,
set: set,
unset: unset,
has: has,
get,
set,
unset,
has,
};
};

Expand Down Expand Up @@ -223,13 +223,13 @@ const util = (() => {
};

return {
buka: buka,
tamu: tamu,
modal: modal,
play: play,
salin: salin,
escapeHtml: escapeHtml,
opacity: opacity
buka,
tamu,
modal,
play,
salin,
escapeHtml,
opacity,
};
})();

Expand Down Expand Up @@ -415,9 +415,7 @@ const session = (() => {
}
};

return {
check: check,
};
return { check };
})();

const like = (() => {
Expand Down Expand Up @@ -479,9 +477,7 @@ const like = (() => {
button.disabled = false;
};

return {
like: like,
};
return { like };
})();

const comment = (() => {
Expand Down Expand Up @@ -994,16 +990,14 @@ const comment = (() => {
};

return {
ucapan: ucapan,
renderLoading: renderLoading,

balasan: balasan,
hapus: hapus,
edit: edit,

batal: batal,
balas: balas,
ubah: ubah,
kirim: kirim,
ucapan,
renderLoading,
balasan,
hapus,
edit,
batal,
balas,
ubah,
kirim,
};
})();

0 comments on commit 48df2f2

Please sign in to comment.