@mkody/twitch-emoticons 2.5.0 → 2.6.1

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 (42) hide show
  1. package/.github/codeql/codeql-config.yml +5 -0
  2. package/.github/workflows/codeql.yml +50 -0
  3. package/.github/workflows/eslint.yml +51 -0
  4. package/.github/workflows/yarn-test.yml +0 -1
  5. package/.jsdoc.json +5 -0
  6. package/LICENSE +1 -0
  7. package/README.md +85 -13
  8. package/docs/BTTVEmote.html +1241 -1191
  9. package/docs/Channel.html +823 -700
  10. package/docs/Collection.html +797 -791
  11. package/docs/Emote.html +801 -768
  12. package/docs/EmoteFetcher.html +2694 -2075
  13. package/docs/EmoteParser.html +811 -792
  14. package/docs/FFZEmote.html +1317 -1263
  15. package/docs/SevenTV.html +1191 -0
  16. package/docs/SevenTVEmote.html +1318 -0
  17. package/docs/TwitchEmote.html +1237 -1189
  18. package/docs/index.html +201 -132
  19. package/docs/scripts/collapse.js +38 -19
  20. package/docs/scripts/commonNav.js +28 -0
  21. package/docs/scripts/search.js +98 -82
  22. package/docs/struct_BTTVEmote.js.html +72 -69
  23. package/docs/struct_Channel.js.html +88 -77
  24. package/docs/struct_Emote.js.html +73 -70
  25. package/docs/struct_EmoteFetcher.js.html +168 -109
  26. package/docs/struct_EmoteParser.js.html +72 -69
  27. package/docs/struct_FFZEmote.js.html +72 -69
  28. package/docs/struct_SevenTVEmote.js.html +135 -0
  29. package/docs/struct_TwitchEmote.js.html +72 -69
  30. package/docs/styles/jsdoc.css +776 -765
  31. package/docs/styles/prettify.css +80 -79
  32. package/docs/util_Collection.js.html +72 -69
  33. package/package.json +15 -13
  34. package/src/index.js +4 -3
  35. package/src/struct/Channel.js +16 -8
  36. package/src/struct/Emote.js +1 -1
  37. package/src/struct/EmoteFetcher.js +96 -40
  38. package/src/struct/SevenTVEmote.js +63 -0
  39. package/src/util/Constants.js +5 -1
  40. package/test/index.js +39 -3
  41. package/typings/index.d.ts +35 -18
  42. package/typings/test.ts +0 -24
@@ -1,52 +1,57 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>struct/EmoteFetcher.js - Documentation</title>
7
-
8
-
9
- <script src="scripts/prettify/prettify.js"></script>
10
- <script src="scripts/prettify/lang-css.js"></script>
11
- <!--[if lt IE 9]>
12
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
- <script src="scripts/nav.js" defer></script>
17
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
- </head>
19
- <body>
20
-
21
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
- <label for="nav-trigger" class="navicon-button x">
23
- <div class="navicon"></div>
24
- </label>
25
-
26
- <label for="nav-trigger" class="overlay"></label>
27
-
28
- <nav >
29
-
30
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toString">toString</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toString">toString</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toString">toString</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toString">toString</a></li></ul></li></ul>
31
- </nav>
32
-
33
- <div id="main">
34
-
35
- <h1 class="page-title">struct/EmoteFetcher.js</h1>
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
- <section>
44
- <article>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>struct/EmoteFetcher.js - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
+ </head>
20
+ <body>
21
+
22
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
+ <label for="nav-trigger" class="navicon-button x">
24
+ <div class="navicon"></div>
25
+ </label>
26
+
27
+ <label for="nav-trigger" class="overlay"></label>
28
+
29
+ <nav >
30
+
31
+
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#.toLink#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#.toString#toString">toString</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#.fetchBTTVEmotes#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#.fetchFFZEmotes#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#.fetchSevenTVEmotes#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#.filter#filter">filter</a></li><li data-type='method'><a href="Collection.html#.find#find">find</a></li><li data-type='method'><a href="Collection.html#.map#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#.toString#toString">toString</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#._cacheBTTVEmote#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#._cacheFFZEmote#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#._cacheSevenTVEmote#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#._cacheTwitchEmote#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#._getRawBTTVEmotes#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#._getRawFFZEmotes#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#._getRawSevenTVEmotes#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#._getRawTwitchEmotes#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#.fetchBTTVEmotes#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#.fetchFFZEmotes#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#.fetchSevenTVEmotes#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#.fetchTwitchEmotes#fetchTwitchEmotes">fetchTwitchEmotes</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#.parse#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#.toLink#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#.toString#toString">toString</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#.toLink#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#.toString#toString">toString</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#.toLink#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#.toString#toString">toString</a></li></ul></li></ul>
33
+
34
+ </nav>
35
+
36
+ <div id="main">
37
+
38
+ <h1 class="page-title">struct/EmoteFetcher.js</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+ <article>
45
48
  <pre class="prettyprint source linenums"><code>const BTTVEmote = require('./BTTVEmote');
46
49
  const Channel = require('./Channel');
47
50
  const Collection = require('../util/Collection');
48
51
  const Constants = require('../util/Constants');
49
52
  const FFZEmote = require('./FFZEmote');
53
+ const SevenTVEmote = require('./SevenTVEmote');
54
+
50
55
  const got = require('got');
51
56
  const TwitchEmote = require('./TwitchEmote');
52
57
  const { ApiClient } = require('@twurple/api');
@@ -88,7 +93,7 @@ class EmoteFetcher {
88
93
  }
89
94
 
90
95
  /**
91
- * The global channel for both Twitch and BTTV.
96
+ * The global channel for Twitch, BTTV and 7TV.
92
97
  * @readonly
93
98
  * @type {?Channel}
94
99
  */
@@ -99,7 +104,7 @@ class EmoteFetcher {
99
104
  /**
100
105
  * Gets the raw Twitch emotes data for a channel.
101
106
  * @private
102
- * @param {int} id - Name of the channel.
107
+ * @param {int} id - ID of the channel.
103
108
  * @returns {Promise&lt;Object[]>}
104
109
  */
105
110
  _getRawTwitchEmotes(id) {
@@ -117,15 +122,15 @@ class EmoteFetcher {
117
122
  /**
118
123
  * Converts and caches a raw twitch emote.
119
124
  * @private
120
- * @param {string} name - Name of the channel.
125
+ * @param {int} channel_id - ID of the channel.
121
126
  * @param {Object} data - Raw data.
122
127
  * @returns {TwitchEmote}
123
128
  */
124
- _cacheTwitchEmote(name, data) {
125
- let channel = this.channels.get(name);
129
+ _cacheTwitchEmote(channel_id, data) {
130
+ let channel = this.channels.get(channel_id);
126
131
  if (!channel) {
127
- channel = new Channel(this, name);
128
- this.channels.set(name, channel);
132
+ channel = new Channel(this, channel_id);
133
+ this.channels.set(channel_id, channel);
129
134
  }
130
135
 
131
136
  const emote = new TwitchEmote(channel, data.id, data);
@@ -157,15 +162,15 @@ class EmoteFetcher {
157
162
  /**
158
163
  * Converts and caches a raw BTTV emote.
159
164
  * @private
160
- * @param {string} name - Name of the channel.
165
+ * @param {int} channel_id - ID of the channel.
161
166
  * @param {Object} data - Raw data.
162
167
  * @returns {BTTVEmote}
163
168
  */
164
- _cacheBTTVEmote(name, data) {
165
- let channel = this.channels.get(name);
169
+ _cacheBTTVEmote(channel_id, data) {
170
+ let channel = this.channels.get(channel_id);
166
171
  if (!channel) {
167
- channel = new Channel(this, name);
168
- this.channels.set(name, channel);
172
+ channel = new Channel(this, channel_id);
173
+ this.channels.set(channel_id, channel);
169
174
  }
170
175
 
171
176
  const emote = new BTTVEmote(channel, data.id, data);
@@ -177,17 +182,11 @@ class EmoteFetcher {
177
182
  /**
178
183
  * Gets the raw FFZ emotes data for a channel.
179
184
  * @private
180
- * @param {(number|string)} id - ID or name of the channel.
185
+ * @param {int} id - ID of the channel.
181
186
  * @returns {Promise&lt;Object[]>}
182
187
  */
183
188
  _getRawFFZEmotes(id) {
184
- let endpoint;
185
-
186
- if (typeof id === 'number') {
187
- endpoint = Constants.FFZ.Channel(id); // eslint-disable-line new-cap
188
- } else {
189
- endpoint = Constants.FFZ.ChannelName(id); // eslint-disable-line new-cap
190
- }
189
+ const endpoint = Constants.FFZ.Channel(id); // eslint-disable-line new-cap
191
190
 
192
191
  return got(endpoint, options).then(req => {
193
192
  const emotes = [];
@@ -203,15 +202,15 @@ class EmoteFetcher {
203
202
  /**
204
203
  * Converts and caches a raw FFZ emote.
205
204
  * @private
206
- * @param {string} name - Name of the channel.
205
+ * @param {int} channel_id - ID of the channel.
207
206
  * @param {Object} data - Raw data.
208
207
  * @returns {FFZEmote}
209
208
  */
210
- _cacheFFZEmote(name, data) {
211
- let channel = this.channels.get(name);
209
+ _cacheFFZEmote(channel_id, data) {
210
+ let channel = this.channels.get(channel_id);
212
211
  if (!channel) {
213
- channel = new Channel(this, name);
214
- this.channels.set(name, channel);
212
+ channel = new Channel(this, channel_id);
213
+ this.channels.set(channel_id, channel);
215
214
  }
216
215
 
217
216
  const emote = new FFZEmote(channel, data.id, data);
@@ -220,77 +219,137 @@ class EmoteFetcher {
220
219
  return emote;
221
220
  }
222
221
 
222
+ /**
223
+ * Gets the raw 7TV emotes data for a channel.
224
+ * @private
225
+ * @param {int} [id=null] - ID of the channel.
226
+ * @returns {Promise&lt;Object[]>}
227
+ */
228
+ _getRawSevenTVEmotes(id) {
229
+ const endpoint = !id
230
+ ? Constants.SEVENTV.Global
231
+ : Constants.SEVENTV.Channel(id); // eslint-disable-line new-cap
232
+
233
+ return got(endpoint, options).then(req => req.body);
234
+ }
235
+
236
+ /**
237
+ * Converts and caches a raw 7TV emote.
238
+ * @private
239
+ * @param {int} channel_id - ID of the channel.
240
+ * @param {Object} data - Raw data.
241
+ * @param {string} format - The type file format to use (webp/avif).
242
+ * @returns {SevenTVEmote}
243
+ */
244
+ _cacheSevenTVEmote(channel_id, data, format) {
245
+ let channel = this.channels.get(channel_id);
246
+ if (!channel) {
247
+ channel = new Channel(this, channel_id);
248
+ channel.format = format;
249
+ this.channels.set(channel_id, channel);
250
+ }
251
+
252
+ const emote = new SevenTVEmote(channel, data.id, data);
253
+ this.emotes.set(emote.code, emote);
254
+ channel.emotes.set(emote.code, emote);
255
+ return emote;
256
+ }
257
+
223
258
  /**
224
259
  * Fetches the Twitch emotes for a channel.
225
260
  * Use `null` for the global emotes channel.
226
- * @param {int} [id=null] - ID of the channel.
261
+ * @param {int} [channel=null] - ID of the channel.
227
262
  * @returns {Promise&lt;Collection&lt;string, TwitchEmote>>}
228
263
  */
229
- fetchTwitchEmotes(id = null) {
230
- return this._getRawTwitchEmotes(id).then(rawEmotes => {
264
+ fetchTwitchEmotes(channel = null) {
265
+ return this._getRawTwitchEmotes(channel).then(rawEmotes => {
231
266
  for (const emote of rawEmotes) {
232
- this._cacheTwitchEmote(id, { code: emote.name, id: emote.id });
267
+ this._cacheTwitchEmote(channel, { code: emote.name, id: emote.id });
233
268
  }
234
269
 
235
- return this.channels.get(id).emotes.filter(e => e.type === 'twitch');
270
+ return this.channels.get(channel).emotes.filter(e => e.type === 'twitch');
236
271
  });
237
272
  }
238
273
 
239
274
  /**
240
275
  * Fetches the BTTV emotes for a channel.
241
276
  * Use `null` for the global emotes channel.
242
- * @param {string} [name=null] - Name of the channel.
277
+ * @param {int} [channel=null] - ID of the channel.
243
278
  * @returns {Promise&lt;Collection&lt;string, BTTVEmote>>}
244
279
  */
245
- fetchBTTVEmotes(name = null) {
246
- return this._getRawBTTVEmotes(name).then(rawEmotes => {
280
+ fetchBTTVEmotes(channel = null) {
281
+ return this._getRawBTTVEmotes(channel).then(rawEmotes => {
247
282
  for (const data of rawEmotes) {
248
- this._cacheBTTVEmote(name, data);
283
+ this._cacheBTTVEmote(channel, data);
249
284
  }
250
285
 
251
- return this.channels.get(name).emotes.filter(e => e.type === 'bttv');
286
+ return this.channels.get(channel).emotes.filter(e => e.type === 'bttv');
252
287
  });
253
288
  }
254
289
 
255
290
  /**
256
291
  * Fetches the FFZ emotes for a channel.
257
- * @param {string} name - Name of the channel.
292
+ * @param {int} channel - ID of the channel.
258
293
  * @returns {Promise&lt;Collection&lt;string, FFZEmote>>}
259
294
  */
260
- fetchFFZEmotes(name) {
261
- return this._getRawFFZEmotes(name).then(rawEmotes => {
295
+ fetchFFZEmotes(channel) {
296
+ return this._getRawFFZEmotes(channel).then(rawEmotes => {
262
297
  for (const data of rawEmotes) {
263
- this._cacheFFZEmote(name, data);
298
+ this._cacheFFZEmote(channel, data);
264
299
  }
265
300
 
266
- return this.channels.get(name).emotes.filter(e => e.type === 'ffz');
301
+ return this.channels.get(channel).emotes.filter(e => e.type === 'ffz');
302
+ });
303
+ }
304
+
305
+ /**
306
+ * Fetches the 7TV emotes for a channel.
307
+ * @param {int} [channel=null] - ID of the channel.
308
+ * @param {('webp'|'avif')} [format='webp'] - The type file format to use (webp/avif).
309
+ * @returns {Promise&lt;Collection&lt;string, SevenTVEmote>>}
310
+ */
311
+ fetchSevenTVEmotes(channel = null, format = 'webp') {
312
+ return this._getRawSevenTVEmotes(channel).then(rawEmotes => {
313
+ if ('emotes' in rawEmotes) {
314
+ // From an emote set (like "global")
315
+ for (const data of rawEmotes.emotes) {
316
+ this._cacheSevenTVEmote(channel, data.data, format);
317
+ }
318
+ } else {
319
+ // From users
320
+ for (const data of rawEmotes.emote_set.emotes) {
321
+ this._cacheSevenTVEmote(channel, data.data, format);
322
+ }
323
+ }
324
+
325
+ return this.channels.get(channel).emotes.filter(e => e.type === '7tv');
267
326
  });
268
327
  }
269
328
  }
270
329
 
271
330
  module.exports = EmoteFetcher;
272
- </code></pre>
273
- </article>
274
- </section>
275
-
276
-
277
-
278
-
279
-
280
-
281
- </div>
282
-
283
- <br class="clear">
284
-
285
- <footer>
286
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
287
- </footer>
288
-
289
- <script>prettyPrint();</script>
290
- <script src="scripts/polyfill.js"></script>
291
- <script src="scripts/linenumber.js"></script>
292
-
293
-
294
-
295
- </body>
296
- </html>
331
+ </code></pre>
332
+ </article>
333
+ </section>
334
+
335
+
336
+
337
+
338
+
339
+
340
+ </div>
341
+
342
+ <br class="clear">
343
+
344
+ <footer>
345
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
346
+ </footer>
347
+
348
+ <script>prettyPrint();</script>
349
+ <script src="scripts/polyfill.js"></script>
350
+ <script src="scripts/linenumber.js"></script>
351
+
352
+
353
+
354
+ </body>
355
+ </html>
@@ -1,47 +1,50 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>struct/EmoteParser.js - Documentation</title>
7
-
8
-
9
- <script src="scripts/prettify/prettify.js"></script>
10
- <script src="scripts/prettify/lang-css.js"></script>
11
- <!--[if lt IE 9]>
12
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
- <script src="scripts/nav.js" defer></script>
17
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
- </head>
19
- <body>
20
-
21
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
- <label for="nav-trigger" class="navicon-button x">
23
- <div class="navicon"></div>
24
- </label>
25
-
26
- <label for="nav-trigger" class="overlay"></label>
27
-
28
- <nav >
29
-
30
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toString">toString</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toString">toString</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toString">toString</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toString">toString</a></li></ul></li></ul>
31
- </nav>
32
-
33
- <div id="main">
34
-
35
- <h1 class="page-title">struct/EmoteParser.js</h1>
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
- <section>
44
- <article>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>struct/EmoteParser.js - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
+ </head>
20
+ <body>
21
+
22
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
+ <label for="nav-trigger" class="navicon-button x">
24
+ <div class="navicon"></div>
25
+ </label>
26
+
27
+ <label for="nav-trigger" class="overlay"></label>
28
+
29
+ <nav >
30
+
31
+
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#.toLink#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#.toString#toString">toString</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#.fetchBTTVEmotes#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#.fetchFFZEmotes#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#.fetchSevenTVEmotes#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#.filter#filter">filter</a></li><li data-type='method'><a href="Collection.html#.find#find">find</a></li><li data-type='method'><a href="Collection.html#.map#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#.toString#toString">toString</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#._cacheBTTVEmote#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#._cacheFFZEmote#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#._cacheSevenTVEmote#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#._cacheTwitchEmote#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#._getRawBTTVEmotes#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#._getRawFFZEmotes#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#._getRawSevenTVEmotes#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#._getRawTwitchEmotes#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#.fetchBTTVEmotes#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#.fetchFFZEmotes#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#.fetchSevenTVEmotes#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#.fetchTwitchEmotes#fetchTwitchEmotes">fetchTwitchEmotes</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#.parse#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#.toLink#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#.toString#toString">toString</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#.toLink#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#.toString#toString">toString</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#.toLink#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#.toString#toString">toString</a></li></ul></li></ul>
33
+
34
+ </nav>
35
+
36
+ <div id="main">
37
+
38
+ <h1 class="page-title">struct/EmoteParser.js</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+ <article>
45
48
  <pre class="prettyprint source linenums"><code>const Constants = require('../util/Constants');
46
49
 
47
50
  class EmoteParser {
@@ -122,28 +125,28 @@ class EmoteParser {
122
125
  }
123
126
 
124
127
  module.exports = EmoteParser;
125
- </code></pre>
126
- </article>
127
- </section>
128
-
129
-
130
-
131
-
132
-
133
-
134
- </div>
135
-
136
- <br class="clear">
137
-
138
- <footer>
139
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
140
- </footer>
141
-
142
- <script>prettyPrint();</script>
143
- <script src="scripts/polyfill.js"></script>
144
- <script src="scripts/linenumber.js"></script>
145
-
146
-
147
-
148
- </body>
149
- </html>
128
+ </code></pre>
129
+ </article>
130
+ </section>
131
+
132
+
133
+
134
+
135
+
136
+
137
+ </div>
138
+
139
+ <br class="clear">
140
+
141
+ <footer>
142
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.0</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
143
+ </footer>
144
+
145
+ <script>prettyPrint();</script>
146
+ <script src="scripts/polyfill.js"></script>
147
+ <script src="scripts/linenumber.js"></script>
148
+
149
+
150
+
151
+ </body>
152
+ </html>