emotesjs 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -11
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -15,8 +15,8 @@ class EmotesJS {
15
15
  }
16
16
 
17
17
  if (opts) {
18
- this.channelId = opts.channelId || this.channelId
19
- this.requireColon = opts.requireColon || this.requireColon
18
+ this.channelId = opts.channelId
19
+ this.requireColon = opts.requireColon
20
20
  this.height = opts.height || this.height
21
21
  this.format = opts.format || this.format
22
22
  }
@@ -89,16 +89,14 @@ class EmotesJS {
89
89
  for (let i = 0; i < words.length; i++) {
90
90
  let word = words[i]
91
91
 
92
- if (this.requireColon && !word.startsWith(":")) {
93
- continue
94
- }
95
-
96
- let wordKey = word.replace(':', '')
97
- let emote = this.cachedEmotes.get(wordKey)
92
+ if (this.requireColon && word.startsWith(":")) {
93
+ let wordKey = word.replace(':', '')
94
+ let emote = this.cachedEmotes.get(wordKey)
98
95
 
99
- if (emote) {
100
- fullText += emote + ' '
101
- continue;
96
+ if (emote) {
97
+ fullText += emote + ' '
98
+ continue;
99
+ }
102
100
  }
103
101
 
104
102
  fullText += word + " "
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "emotesjs",
3
3
  "description": "",
4
- "version": "0.0.13",
4
+ "version": "0.0.15",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "darckfast"