We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19fbc54 commit 018b9f1Copy full SHA for 018b9f1
src/emoji.js
@@ -1,13 +1,21 @@
1
-import logLevels from './config/log-levels';
+import { getLevelByType } from './log-levels';
2
3
-export default class Emoji {
4
- static setEmoji(type, emoji) {
5
- const foundByType = logLevels.get(type);
+const Emoji = (() => {
+ function setEmoji(type, emoji) {
+ const foundByType = getLevelByType(type);
6
foundByType.emoji = emoji;
7
return emoji;
8
};
9
10
- static getEmoji(type) {
11
- return logLevels.get(type).emoji;
+ function getEmoji(type) {
+ const { emoji } = getLevelByType(type);
12
+ return emoji;
13
+ }
14
+
15
+ return {
16
+ setEmoji,
17
+ getEmoji
18
}
-}
19
+})();
20
21
+export default Emoji;
0 commit comments