@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.
- package/.github/codeql/codeql-config.yml +5 -0
- package/.github/workflows/codeql.yml +50 -0
- package/.github/workflows/eslint.yml +51 -0
- package/.github/workflows/yarn-test.yml +0 -1
- package/.jsdoc.json +5 -0
- package/LICENSE +1 -0
- package/README.md +85 -13
- package/docs/BTTVEmote.html +1241 -1191
- package/docs/Channel.html +823 -700
- package/docs/Collection.html +797 -791
- package/docs/Emote.html +801 -768
- package/docs/EmoteFetcher.html +2694 -2075
- package/docs/EmoteParser.html +811 -792
- package/docs/FFZEmote.html +1317 -1263
- package/docs/SevenTV.html +1191 -0
- package/docs/SevenTVEmote.html +1318 -0
- package/docs/TwitchEmote.html +1237 -1189
- package/docs/index.html +201 -132
- package/docs/scripts/collapse.js +38 -19
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/search.js +98 -82
- package/docs/struct_BTTVEmote.js.html +72 -69
- package/docs/struct_Channel.js.html +88 -77
- package/docs/struct_Emote.js.html +73 -70
- package/docs/struct_EmoteFetcher.js.html +168 -109
- package/docs/struct_EmoteParser.js.html +72 -69
- package/docs/struct_FFZEmote.js.html +72 -69
- package/docs/struct_SevenTVEmote.js.html +135 -0
- package/docs/struct_TwitchEmote.js.html +72 -69
- package/docs/styles/jsdoc.css +776 -765
- package/docs/styles/prettify.css +80 -79
- package/docs/util_Collection.js.html +72 -69
- package/package.json +15 -13
- package/src/index.js +4 -3
- package/src/struct/Channel.js +16 -8
- package/src/struct/Emote.js +1 -1
- package/src/struct/EmoteFetcher.js +96 -40
- package/src/struct/SevenTVEmote.js +63 -0
- package/src/util/Constants.js +5 -1
- package/test/index.js +39 -3
- package/typings/index.d.ts +35 -18
- 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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
|
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 -
|
|
107
|
+
* @param {int} id - ID of the channel.
|
|
103
108
|
* @returns {Promise<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 {
|
|
125
|
+
* @param {int} channel_id - ID of the channel.
|
|
121
126
|
* @param {Object} data - Raw data.
|
|
122
127
|
* @returns {TwitchEmote}
|
|
123
128
|
*/
|
|
124
|
-
_cacheTwitchEmote(
|
|
125
|
-
let channel = this.channels.get(
|
|
129
|
+
_cacheTwitchEmote(channel_id, data) {
|
|
130
|
+
let channel = this.channels.get(channel_id);
|
|
126
131
|
if (!channel) {
|
|
127
|
-
channel = new Channel(this,
|
|
128
|
-
this.channels.set(
|
|
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 {
|
|
165
|
+
* @param {int} channel_id - ID of the channel.
|
|
161
166
|
* @param {Object} data - Raw data.
|
|
162
167
|
* @returns {BTTVEmote}
|
|
163
168
|
*/
|
|
164
|
-
_cacheBTTVEmote(
|
|
165
|
-
let channel = this.channels.get(
|
|
169
|
+
_cacheBTTVEmote(channel_id, data) {
|
|
170
|
+
let channel = this.channels.get(channel_id);
|
|
166
171
|
if (!channel) {
|
|
167
|
-
channel = new Channel(this,
|
|
168
|
-
this.channels.set(
|
|
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 {
|
|
185
|
+
* @param {int} id - ID of the channel.
|
|
181
186
|
* @returns {Promise<Object[]>}
|
|
182
187
|
*/
|
|
183
188
|
_getRawFFZEmotes(id) {
|
|
184
|
-
|
|
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 {
|
|
205
|
+
* @param {int} channel_id - ID of the channel.
|
|
207
206
|
* @param {Object} data - Raw data.
|
|
208
207
|
* @returns {FFZEmote}
|
|
209
208
|
*/
|
|
210
|
-
_cacheFFZEmote(
|
|
211
|
-
let channel = this.channels.get(
|
|
209
|
+
_cacheFFZEmote(channel_id, data) {
|
|
210
|
+
let channel = this.channels.get(channel_id);
|
|
212
211
|
if (!channel) {
|
|
213
|
-
channel = new Channel(this,
|
|
214
|
-
this.channels.set(
|
|
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<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} [
|
|
261
|
+
* @param {int} [channel=null] - ID of the channel.
|
|
227
262
|
* @returns {Promise<Collection<string, TwitchEmote>>}
|
|
228
263
|
*/
|
|
229
|
-
fetchTwitchEmotes(
|
|
230
|
-
return this._getRawTwitchEmotes(
|
|
264
|
+
fetchTwitchEmotes(channel = null) {
|
|
265
|
+
return this._getRawTwitchEmotes(channel).then(rawEmotes => {
|
|
231
266
|
for (const emote of rawEmotes) {
|
|
232
|
-
this._cacheTwitchEmote(
|
|
267
|
+
this._cacheTwitchEmote(channel, { code: emote.name, id: emote.id });
|
|
233
268
|
}
|
|
234
269
|
|
|
235
|
-
return this.channels.get(
|
|
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 {
|
|
277
|
+
* @param {int} [channel=null] - ID of the channel.
|
|
243
278
|
* @returns {Promise<Collection<string, BTTVEmote>>}
|
|
244
279
|
*/
|
|
245
|
-
fetchBTTVEmotes(
|
|
246
|
-
return this._getRawBTTVEmotes(
|
|
280
|
+
fetchBTTVEmotes(channel = null) {
|
|
281
|
+
return this._getRawBTTVEmotes(channel).then(rawEmotes => {
|
|
247
282
|
for (const data of rawEmotes) {
|
|
248
|
-
this._cacheBTTVEmote(
|
|
283
|
+
this._cacheBTTVEmote(channel, data);
|
|
249
284
|
}
|
|
250
285
|
|
|
251
|
-
return this.channels.get(
|
|
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 {
|
|
292
|
+
* @param {int} channel - ID of the channel.
|
|
258
293
|
* @returns {Promise<Collection<string, FFZEmote>>}
|
|
259
294
|
*/
|
|
260
|
-
fetchFFZEmotes(
|
|
261
|
-
return this._getRawFFZEmotes(
|
|
295
|
+
fetchFFZEmotes(channel) {
|
|
296
|
+
return this._getRawFFZEmotes(channel).then(rawEmotes => {
|
|
262
297
|
for (const data of rawEmotes) {
|
|
263
|
-
this._cacheFFZEmote(
|
|
298
|
+
this._cacheFFZEmote(channel, data);
|
|
264
299
|
}
|
|
265
300
|
|
|
266
|
-
return this.channels.get(
|
|
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<Collection<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
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
|
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>
|