@mkody/twitch-emoticons 2.6.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.
@@ -1,812 +1,812 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>EmoteParser - 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">EmoteParser</h1>
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
- <section>
47
-
48
- <header>
49
-
50
- <h2>
51
-
52
- EmoteParser
53
-
54
- </h2>
55
-
56
-
57
- </header>
58
-
59
- <article>
60
-
61
- <div class="container-overview">
62
-
63
-
64
-
65
-
66
-
67
- <h4 class="name" id="EmoteParser"><span class="type-signature"></span>new EmoteParser<span class="signature">(fetcher, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
68
-
69
-
70
-
71
-
72
-
73
-
74
- <dl class="details">
75
-
76
- <dt class="tag-description">Description:</dt>
77
- <dd class="tag-description"><ul class="dummy"><li><p>A parser to replace text with emotes.</p></li></ul></dd>
78
-
79
-
80
-
81
- <dt class="tag-source">Source:</dt>
82
- <dd class="tag-source"><ul class="dummy"><li>
83
- <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line20">line 20</a>
84
- </li></ul></dd>
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
- </dl>
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
- <h5 class="h5-parameters">Parameters:</h5>
131
-
132
-
133
- <table class="params">
134
- <thead>
135
- <tr>
136
-
137
- <th>Name</th>
138
-
139
-
140
- <th>Type</th>
141
-
142
-
143
- <th>Attributes</th>
144
-
145
-
146
-
147
- <th>Default</th>
148
-
149
-
150
- <th class="last">Description</th>
151
- </tr>
152
- </thead>
153
-
154
- <tbody>
155
-
156
-
157
- <tr>
158
-
159
- <td class="name"><code>fetcher</code></td>
160
-
161
-
162
- <td class="type">
163
-
164
-
165
- <span class="param-type"><a href="EmoteFetcher.html">EmoteFetcher</a></span>
166
-
167
-
168
-
169
-
170
- </td>
171
-
172
-
173
- <td class="attributes">
174
-
175
-
176
-
177
-
178
-
179
- </td>
180
-
181
-
182
-
183
- <td class="default">
184
-
185
- </td>
186
-
187
-
188
- <td class="description last"><p>The fetcher to use the cache of.</p></td>
189
- </tr>
190
-
191
-
192
-
193
- <tr>
194
-
195
- <td class="name"><code>options</code></td>
196
-
197
-
198
- <td class="type">
199
-
200
-
201
- <span class="param-type">Object</span>
202
-
203
-
204
-
205
-
206
- </td>
207
-
208
-
209
- <td class="attributes">
210
-
211
- &lt;optional><br>
212
-
213
-
214
-
215
-
216
-
217
- </td>
218
-
219
-
220
-
221
- <td class="default">
222
-
223
- <code>{}</code>
224
-
225
- </td>
226
-
227
-
228
- <td class="description last"><p>Options for the parser.</p>
229
- <h6>Properties</h6>
230
-
231
-
232
- <table class="params">
233
- <thead>
234
- <tr>
235
-
236
- <th>Name</th>
237
-
238
-
239
- <th>Type</th>
240
-
241
-
242
- <th>Attributes</th>
243
-
244
-
245
-
246
- <th>Default</th>
247
-
248
-
249
- <th class="last">Description</th>
250
- </tr>
251
- </thead>
252
-
253
- <tbody>
254
-
255
-
256
- <tr>
257
-
258
- <td class="name"><code>template</code></td>
259
-
260
-
261
- <td class="type">
262
-
263
-
264
- <span class="param-type">string</span>
265
-
266
-
267
-
268
-
269
- </td>
270
-
271
-
272
- <td class="attributes">
273
-
274
- &lt;optional><br>
275
-
276
-
277
-
278
-
279
-
280
- </td>
281
-
282
-
283
-
284
- <td class="default">
285
-
286
- </td>
287
-
288
-
289
- <td class="description last"><p>The template to be used.<br>
290
- The strings that can be interpolated are:</p>
291
- <ul>
292
- <li><code>{link}</code> The link of the emote.</li>
293
- <li><code>{name}</code> The name of the emote.</li>
294
- <li><code>{size}</code> The size of the image.</li>
295
- <li><code>{creator}</code> The channel/owner name of the emote.</li>
296
- </ul></td>
297
- </tr>
298
-
299
-
300
-
301
- <tr>
302
-
303
- <td class="name"><code>type</code></td>
304
-
305
-
306
- <td class="type">
307
-
308
-
309
- <span class="param-type">string</span>
310
-
311
-
312
-
313
-
314
- </td>
315
-
316
-
317
- <td class="attributes">
318
-
319
- &lt;optional><br>
320
-
321
-
322
-
323
-
324
-
325
- </td>
326
-
327
-
328
-
329
- <td class="default">
330
-
331
- <code>'markdown'</code>
332
-
333
- </td>
334
-
335
-
336
- <td class="description last"><p>The type of the parser.<br>
337
- Can be one of <code>markdown</code>, <code>html</code>, <code>bbcode</code>, or <code>plain</code>.<br>
338
- If the <code>template</code> option is provided, this is ignored.</p></td>
339
- </tr>
340
-
341
-
342
-
343
- <tr>
344
-
345
- <td class="name"><code>match</code></td>
346
-
347
-
348
- <td class="type">
349
-
350
-
351
- <span class="param-type">RegExp</span>
352
-
353
-
354
-
355
-
356
- </td>
357
-
358
-
359
- <td class="attributes">
360
-
361
- &lt;optional><br>
362
-
363
-
364
-
365
-
366
-
367
- </td>
368
-
369
-
370
-
371
- <td class="default">
372
-
373
- <code>/:(.+?):/g</code>
374
-
375
- </td>
376
-
377
-
378
- <td class="description last"><p>The regular expression that matches an emote.<br>
379
- Must be a global regex, with one capture group for the emote code.</p></td>
380
- </tr>
381
-
382
-
383
- </tbody>
384
- </table>
385
-
386
- </td>
387
- </tr>
388
-
389
-
390
- </tbody>
391
- </table>
392
-
393
-
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
-
412
- </div>
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
- <h3 class="subsection-title">Members</h3>
429
-
430
-
431
-
432
- <h4 class="name" id="fetcher"><span class="type-signature"></span>fetcher<span class="type-signature"> :<a href="EmoteFetcher.html">EmoteFetcher</a></span></h4>
433
-
434
-
435
-
436
-
437
-
438
- <dl class="details">
439
-
440
- <dt class="tag-description">Description:</dt>
441
- <dd class="tag-description"><ul class="dummy"><li><p>The emote fetcher being used.</p></li></ul></dd>
442
-
443
-
444
-
445
- <dt class="tag-source">Source:</dt>
446
- <dd class="tag-source"><ul class="dummy"><li>
447
- <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line25">line 25</a>
448
- </li></ul></dd>
449
-
450
-
451
-
452
-
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
- </dl>
481
-
482
-
483
-
484
-
485
-
486
- <div class="description usertext">
487
- <p>The emote fetcher being used.</p>
488
- </div>
489
-
490
-
491
-
492
- <h5 class="h5-types">Type:</h5>
493
- <ul>
494
- <li>
495
-
496
- <span class="param-type"><a href="EmoteFetcher.html">EmoteFetcher</a></span>
497
-
498
-
499
-
500
- </li>
501
- </ul>
502
-
503
-
504
-
505
-
506
-
507
-
508
-
509
-
510
- <h4 class="name" id="options"><span class="type-signature"></span>options<span class="type-signature"> :Object</span></h4>
511
-
512
-
513
-
514
-
515
-
516
- <dl class="details">
517
-
518
- <dt class="tag-description">Description:</dt>
519
- <dd class="tag-description"><ul class="dummy"><li><p>The parser options.</p></li></ul></dd>
520
-
521
-
522
-
523
- <dt class="tag-source">Source:</dt>
524
- <dd class="tag-source"><ul class="dummy"><li>
525
- <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line31">line 31</a>
526
- </li></ul></dd>
527
-
528
-
529
-
530
-
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
-
540
-
541
-
542
-
543
-
544
-
545
-
546
-
547
-
548
-
549
-
550
-
551
-
552
-
553
-
554
-
555
-
556
-
557
-
558
- </dl>
559
-
560
-
561
-
562
-
563
-
564
- <div class="description usertext">
565
- <p>The parser options.</p>
566
- </div>
567
-
568
-
569
-
570
- <h5 class="h5-types">Type:</h5>
571
- <ul>
572
- <li>
573
-
574
- <span class="param-type">Object</span>
575
-
576
-
577
-
578
- </li>
579
- </ul>
580
-
581
-
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
- <h3 class="subsection-title">Methods</h3>
591
-
592
-
593
-
594
-
595
-
596
-
597
- <h4 class="name" id="parse"><span class="type-signature"></span>parse<span class="signature">(text, size)</span><span class="type-signature"> &rarr; {string}</span></h4>
598
-
599
-
600
-
601
-
602
-
603
-
604
- <dl class="details">
605
-
606
- <dt class="tag-description">Description:</dt>
607
- <dd class="tag-description"><ul class="dummy"><li><p>Parses text.</p></li></ul></dd>
608
-
609
-
610
-
611
- <dt class="tag-source">Source:</dt>
612
- <dd class="tag-source"><ul class="dummy"><li>
613
- <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line60">line 60</a>
614
- </li></ul></dd>
615
-
616
-
617
-
618
-
619
-
620
-
621
-
622
-
623
-
624
-
625
-
626
-
627
-
628
-
629
-
630
-
631
-
632
-
633
-
634
-
635
-
636
-
637
-
638
-
639
-
640
-
641
-
642
-
643
-
644
-
645
-
646
- </dl>
647
-
648
-
649
-
650
-
651
-
652
-
653
-
654
-
655
-
656
-
657
-
658
-
659
-
660
- <h5 class="h5-parameters">Parameters:</h5>
661
-
662
-
663
- <table class="params">
664
- <thead>
665
- <tr>
666
-
667
- <th>Name</th>
668
-
669
-
670
- <th>Type</th>
671
-
672
-
673
-
674
-
675
- <th>Default</th>
676
-
677
-
678
- <th class="last">Description</th>
679
- </tr>
680
- </thead>
681
-
682
- <tbody>
683
-
684
-
685
- <tr>
686
-
687
- <td class="name"><code>text</code></td>
688
-
689
-
690
- <td class="type">
691
-
692
-
693
- <span class="param-type">string</span>
694
-
695
-
696
-
697
-
698
- </td>
699
-
700
-
701
-
702
-
703
- <td class="default">
704
-
705
- </td>
706
-
707
-
708
- <td class="description last"><p>Text to parse.</p></td>
709
- </tr>
710
-
711
-
712
-
713
- <tr>
714
-
715
- <td class="name"><code>size</code></td>
716
-
717
-
718
- <td class="type">
719
-
720
-
721
- <span class="param-type">number</span>
722
-
723
-
724
-
725
-
726
- </td>
727
-
728
-
729
-
730
-
731
- <td class="default">
732
-
733
- <code>0</code>
734
-
735
- </td>
736
-
737
-
738
- <td class="description last"><p>Size for emotes.</p></td>
739
- </tr>
740
-
741
-
742
- </tbody>
743
- </table>
744
-
745
-
746
-
747
-
748
-
749
-
750
-
751
-
752
-
753
-
754
-
755
-
756
-
757
-
758
-
759
-
760
- <h5 class="h5-returns">Returns:</h5>
761
-
762
-
763
-
764
-
765
- <dl class="param-type">
766
- <dt>
767
- Type
768
- </dt>
769
- <dd>
770
-
771
- <span class="param-type">string</span>
772
-
773
-
774
-
775
- </dd>
776
- </dl>
777
-
778
-
779
-
780
-
781
-
782
-
783
-
784
-
785
-
786
-
787
-
788
- </article>
789
-
790
- </section>
791
-
792
-
793
-
794
-
795
-
796
-
797
- </div>
798
-
799
- <br class="clear">
800
-
801
- <footer>
802
- 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.
803
- </footer>
804
-
805
- <script>prettyPrint();</script>
806
- <script src="scripts/polyfill.js"></script>
807
- <script src="scripts/linenumber.js"></script>
808
-
809
-
810
-
811
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>EmoteParser - 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">EmoteParser</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+
48
+ <header>
49
+
50
+ <h2>
51
+
52
+ EmoteParser
53
+
54
+ </h2>
55
+
56
+
57
+ </header>
58
+
59
+ <article>
60
+
61
+ <div class="container-overview">
62
+
63
+
64
+
65
+
66
+
67
+ <h4 class="name" id="EmoteParser"><span class="type-signature"></span>new EmoteParser<span class="signature">(fetcher, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dl class="details">
75
+
76
+ <dt class="tag-description">Description:</dt>
77
+ <dd class="tag-description"><ul class="dummy"><li><p>A parser to replace text with emotes.</p></li></ul></dd>
78
+
79
+
80
+
81
+ <dt class="tag-source">Source:</dt>
82
+ <dd class="tag-source"><ul class="dummy"><li>
83
+ <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line20">line 20</a>
84
+ </li></ul></dd>
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ </dl>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <h5 class="h5-parameters">Parameters:</h5>
131
+
132
+
133
+ <table class="params">
134
+ <thead>
135
+ <tr>
136
+
137
+ <th>Name</th>
138
+
139
+
140
+ <th>Type</th>
141
+
142
+
143
+ <th>Attributes</th>
144
+
145
+
146
+
147
+ <th>Default</th>
148
+
149
+
150
+ <th class="last">Description</th>
151
+ </tr>
152
+ </thead>
153
+
154
+ <tbody>
155
+
156
+
157
+ <tr>
158
+
159
+ <td class="name"><code>fetcher</code></td>
160
+
161
+
162
+ <td class="type">
163
+
164
+
165
+ <span class="param-type"><a href="EmoteFetcher.html">EmoteFetcher</a></span>
166
+
167
+
168
+
169
+
170
+ </td>
171
+
172
+
173
+ <td class="attributes">
174
+
175
+
176
+
177
+
178
+
179
+ </td>
180
+
181
+
182
+
183
+ <td class="default">
184
+
185
+ </td>
186
+
187
+
188
+ <td class="description last"><p>The fetcher to use the cache of.</p></td>
189
+ </tr>
190
+
191
+
192
+
193
+ <tr>
194
+
195
+ <td class="name"><code>options</code></td>
196
+
197
+
198
+ <td class="type">
199
+
200
+
201
+ <span class="param-type">Object</span>
202
+
203
+
204
+
205
+
206
+ </td>
207
+
208
+
209
+ <td class="attributes">
210
+
211
+ &lt;optional><br>
212
+
213
+
214
+
215
+
216
+
217
+ </td>
218
+
219
+
220
+
221
+ <td class="default">
222
+
223
+ <code>{}</code>
224
+
225
+ </td>
226
+
227
+
228
+ <td class="description last"><p>Options for the parser.</p>
229
+ <h6>Properties</h6>
230
+
231
+
232
+ <table class="params">
233
+ <thead>
234
+ <tr>
235
+
236
+ <th>Name</th>
237
+
238
+
239
+ <th>Type</th>
240
+
241
+
242
+ <th>Attributes</th>
243
+
244
+
245
+
246
+ <th>Default</th>
247
+
248
+
249
+ <th class="last">Description</th>
250
+ </tr>
251
+ </thead>
252
+
253
+ <tbody>
254
+
255
+
256
+ <tr>
257
+
258
+ <td class="name"><code>template</code></td>
259
+
260
+
261
+ <td class="type">
262
+
263
+
264
+ <span class="param-type">string</span>
265
+
266
+
267
+
268
+
269
+ </td>
270
+
271
+
272
+ <td class="attributes">
273
+
274
+ &lt;optional><br>
275
+
276
+
277
+
278
+
279
+
280
+ </td>
281
+
282
+
283
+
284
+ <td class="default">
285
+
286
+ </td>
287
+
288
+
289
+ <td class="description last"><p>The template to be used.<br>
290
+ The strings that can be interpolated are:</p>
291
+ <ul>
292
+ <li><code>{link}</code> The link of the emote.</li>
293
+ <li><code>{name}</code> The name of the emote.</li>
294
+ <li><code>{size}</code> The size of the image.</li>
295
+ <li><code>{creator}</code> The channel/owner name of the emote.</li>
296
+ </ul></td>
297
+ </tr>
298
+
299
+
300
+
301
+ <tr>
302
+
303
+ <td class="name"><code>type</code></td>
304
+
305
+
306
+ <td class="type">
307
+
308
+
309
+ <span class="param-type">string</span>
310
+
311
+
312
+
313
+
314
+ </td>
315
+
316
+
317
+ <td class="attributes">
318
+
319
+ &lt;optional><br>
320
+
321
+
322
+
323
+
324
+
325
+ </td>
326
+
327
+
328
+
329
+ <td class="default">
330
+
331
+ <code>'markdown'</code>
332
+
333
+ </td>
334
+
335
+
336
+ <td class="description last"><p>The type of the parser.<br>
337
+ Can be one of <code>markdown</code>, <code>html</code>, <code>bbcode</code>, or <code>plain</code>.<br>
338
+ If the <code>template</code> option is provided, this is ignored.</p></td>
339
+ </tr>
340
+
341
+
342
+
343
+ <tr>
344
+
345
+ <td class="name"><code>match</code></td>
346
+
347
+
348
+ <td class="type">
349
+
350
+
351
+ <span class="param-type">RegExp</span>
352
+
353
+
354
+
355
+
356
+ </td>
357
+
358
+
359
+ <td class="attributes">
360
+
361
+ &lt;optional><br>
362
+
363
+
364
+
365
+
366
+
367
+ </td>
368
+
369
+
370
+
371
+ <td class="default">
372
+
373
+ <code>/:(.+?):/g</code>
374
+
375
+ </td>
376
+
377
+
378
+ <td class="description last"><p>The regular expression that matches an emote.<br>
379
+ Must be a global regex, with one capture group for the emote code.</p></td>
380
+ </tr>
381
+
382
+
383
+ </tbody>
384
+ </table>
385
+
386
+ </td>
387
+ </tr>
388
+
389
+
390
+ </tbody>
391
+ </table>
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+ </div>
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+ <h3 class="subsection-title">Members</h3>
429
+
430
+
431
+
432
+ <h4 class="name" id="fetcher"><span class="type-signature"></span>fetcher<span class="type-signature"> :<a href="EmoteFetcher.html">EmoteFetcher</a></span></h4>
433
+
434
+
435
+
436
+
437
+
438
+ <dl class="details">
439
+
440
+ <dt class="tag-description">Description:</dt>
441
+ <dd class="tag-description"><ul class="dummy"><li><p>The emote fetcher being used.</p></li></ul></dd>
442
+
443
+
444
+
445
+ <dt class="tag-source">Source:</dt>
446
+ <dd class="tag-source"><ul class="dummy"><li>
447
+ <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line25">line 25</a>
448
+ </li></ul></dd>
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+ </dl>
481
+
482
+
483
+
484
+
485
+
486
+ <div class="description usertext">
487
+ <p>The emote fetcher being used.</p>
488
+ </div>
489
+
490
+
491
+
492
+ <h5 class="h5-types">Type:</h5>
493
+ <ul>
494
+ <li>
495
+
496
+ <span class="param-type"><a href="EmoteFetcher.html">EmoteFetcher</a></span>
497
+
498
+
499
+
500
+ </li>
501
+ </ul>
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+ <h4 class="name" id="options"><span class="type-signature"></span>options<span class="type-signature"> :Object</span></h4>
511
+
512
+
513
+
514
+
515
+
516
+ <dl class="details">
517
+
518
+ <dt class="tag-description">Description:</dt>
519
+ <dd class="tag-description"><ul class="dummy"><li><p>The parser options.</p></li></ul></dd>
520
+
521
+
522
+
523
+ <dt class="tag-source">Source:</dt>
524
+ <dd class="tag-source"><ul class="dummy"><li>
525
+ <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line31">line 31</a>
526
+ </li></ul></dd>
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+ </dl>
559
+
560
+
561
+
562
+
563
+
564
+ <div class="description usertext">
565
+ <p>The parser options.</p>
566
+ </div>
567
+
568
+
569
+
570
+ <h5 class="h5-types">Type:</h5>
571
+ <ul>
572
+ <li>
573
+
574
+ <span class="param-type">Object</span>
575
+
576
+
577
+
578
+ </li>
579
+ </ul>
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+ <h3 class="subsection-title">Methods</h3>
591
+
592
+
593
+
594
+
595
+
596
+
597
+ <h4 class="name" id="parse"><span class="type-signature"></span>parse<span class="signature">(text, size)</span><span class="type-signature"> &rarr; {string}</span></h4>
598
+
599
+
600
+
601
+
602
+
603
+
604
+ <dl class="details">
605
+
606
+ <dt class="tag-description">Description:</dt>
607
+ <dd class="tag-description"><ul class="dummy"><li><p>Parses text.</p></li></ul></dd>
608
+
609
+
610
+
611
+ <dt class="tag-source">Source:</dt>
612
+ <dd class="tag-source"><ul class="dummy"><li>
613
+ <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line60">line 60</a>
614
+ </li></ul></dd>
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+ </dl>
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+ <h5 class="h5-parameters">Parameters:</h5>
661
+
662
+
663
+ <table class="params">
664
+ <thead>
665
+ <tr>
666
+
667
+ <th>Name</th>
668
+
669
+
670
+ <th>Type</th>
671
+
672
+
673
+
674
+
675
+ <th>Default</th>
676
+
677
+
678
+ <th class="last">Description</th>
679
+ </tr>
680
+ </thead>
681
+
682
+ <tbody>
683
+
684
+
685
+ <tr>
686
+
687
+ <td class="name"><code>text</code></td>
688
+
689
+
690
+ <td class="type">
691
+
692
+
693
+ <span class="param-type">string</span>
694
+
695
+
696
+
697
+
698
+ </td>
699
+
700
+
701
+
702
+
703
+ <td class="default">
704
+
705
+ </td>
706
+
707
+
708
+ <td class="description last"><p>Text to parse.</p></td>
709
+ </tr>
710
+
711
+
712
+
713
+ <tr>
714
+
715
+ <td class="name"><code>size</code></td>
716
+
717
+
718
+ <td class="type">
719
+
720
+
721
+ <span class="param-type">number</span>
722
+
723
+
724
+
725
+
726
+ </td>
727
+
728
+
729
+
730
+
731
+ <td class="default">
732
+
733
+ <code>0</code>
734
+
735
+ </td>
736
+
737
+
738
+ <td class="description last"><p>Size for emotes.</p></td>
739
+ </tr>
740
+
741
+
742
+ </tbody>
743
+ </table>
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+
760
+ <h5 class="h5-returns">Returns:</h5>
761
+
762
+
763
+
764
+
765
+ <dl class="param-type">
766
+ <dt>
767
+ Type
768
+ </dt>
769
+ <dd>
770
+
771
+ <span class="param-type">string</span>
772
+
773
+
774
+
775
+ </dd>
776
+ </dl>
777
+
778
+
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+
787
+
788
+ </article>
789
+
790
+ </section>
791
+
792
+
793
+
794
+
795
+
796
+
797
+ </div>
798
+
799
+ <br class="clear">
800
+
801
+ <footer>
802
+ 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.
803
+ </footer>
804
+
805
+ <script>prettyPrint();</script>
806
+ <script src="scripts/polyfill.js"></script>
807
+ <script src="scripts/linenumber.js"></script>
808
+
809
+
810
+
811
+ </body>
812
812
  </html>