@mkody/twitch-emoticons 2.9.6 → 3.0.0-beta.2

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 (80) hide show
  1. package/README.md +530 -169
  2. package/dist/TwitchEmoticons.cjs +950 -0
  3. package/dist/TwitchEmoticons.esm.min.js +7 -0
  4. package/dist/TwitchEmoticons.esm.min.js.map +7 -0
  5. package/dist/TwitchEmoticons.min.js +2 -20
  6. package/dist/TwitchEmoticons.min.js.map +4 -4
  7. package/package.json +99 -72
  8. package/src/index.js +38 -12
  9. package/src/struct/BTTVEmote.js +72 -74
  10. package/src/struct/Channel.js +48 -48
  11. package/src/struct/Emote.js +71 -71
  12. package/src/struct/EmoteFetcher.js +358 -322
  13. package/src/struct/EmoteParser.js +95 -84
  14. package/src/struct/EmoteTypeMapper.js +9 -9
  15. package/src/struct/FFZEmote.js +91 -93
  16. package/src/struct/SevenTVEmote.js +88 -90
  17. package/src/struct/TwitchEmote.js +72 -71
  18. package/src/util/Collection.js +69 -55
  19. package/src/util/Constants.js +30 -30
  20. package/typings/index.d.cts +254 -0
  21. package/typings/index.d.ts +216 -99
  22. package/.jsdoc.json +0 -46
  23. package/.nvmrc +0 -1
  24. package/docs/BTTVEmote.html +0 -1532
  25. package/docs/Channel.html +0 -824
  26. package/docs/Collection.html +0 -798
  27. package/docs/Emote.html +0 -832
  28. package/docs/EmoteFetcher.html +0 -3741
  29. package/docs/EmoteParser.html +0 -1187
  30. package/docs/FFZEmote.html +0 -1686
  31. package/docs/SevenTVEmote.html +0 -1596
  32. package/docs/TwitchEmote.html +0 -1528
  33. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  34. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  35. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  36. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  37. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  38. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  39. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  40. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  41. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  42. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
  43. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  44. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  45. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  46. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  47. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
  48. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  49. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  50. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  51. package/docs/index.html +0 -233
  52. package/docs/scripts/collapse.js +0 -39
  53. package/docs/scripts/commonNav.js +0 -28
  54. package/docs/scripts/linenumber.js +0 -25
  55. package/docs/scripts/nav.js +0 -12
  56. package/docs/scripts/polyfill.js +0 -4
  57. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
  58. package/docs/scripts/prettify/lang-css.js +0 -2
  59. package/docs/scripts/prettify/prettify.js +0 -28
  60. package/docs/scripts/search.js +0 -99
  61. package/docs/struct_BTTVEmote.js.html +0 -162
  62. package/docs/struct_Channel.js.html +0 -132
  63. package/docs/struct_Emote.js.html +0 -159
  64. package/docs/struct_EmoteFetcher.js.html +0 -429
  65. package/docs/struct_EmoteParser.js.html +0 -172
  66. package/docs/struct_FFZEmote.js.html +0 -185
  67. package/docs/struct_SevenTVEmote.js.html +0 -180
  68. package/docs/struct_TwitchEmote.js.html +0 -159
  69. package/docs/styles/jsdoc.css +0 -776
  70. package/docs/styles/prettify.css +0 -80
  71. package/docs/util_Collection.js.html +0 -151
  72. package/eslint.config.mjs +0 -215
  73. package/jest.config.js +0 -198
  74. package/test/BTTV.test.js +0 -48
  75. package/test/FFZ.test.js +0 -71
  76. package/test/SevenTV.test.js +0 -71
  77. package/test/ToFromObject.test.js +0 -156
  78. package/test/Twitch.test.js +0 -64
  79. package/test/__snapshots__/ToFromObject.test.js.snap +0 -121
  80. package/test/other.test.js +0 -72
@@ -1,1187 +0,0 @@
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><h2><a href="https://github.com/mkody/twitch-emoticons" target="_blank" class="menu-item" id="github_link" >GitHub</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#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</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><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</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#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</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#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</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#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#map">map</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
- <code>''</code>
287
-
288
- </td>
289
-
290
-
291
- <td class="description last"><p>The template to be used.<br>
292
- The strings that can be interpolated are:</p>
293
- <ul>
294
- <li><code>{link}</code> The link of the emote.</li>
295
- <li><code>{name}</code> The name of the emote.</li>
296
- <li><code>{size}</code> The size of the image.</li>
297
- <li><code>{creator}</code> The channel/owner name of the emote.</li>
298
- </ul></td>
299
- </tr>
300
-
301
-
302
-
303
- <tr>
304
-
305
- <td class="name"><code>type</code></td>
306
-
307
-
308
- <td class="type">
309
-
310
-
311
- <span class="param-type">string</span>
312
-
313
-
314
-
315
-
316
- </td>
317
-
318
-
319
- <td class="attributes">
320
-
321
- &lt;optional><br>
322
-
323
-
324
-
325
-
326
-
327
- </td>
328
-
329
-
330
-
331
- <td class="default">
332
-
333
- <code>'markdown'</code>
334
-
335
- </td>
336
-
337
-
338
- <td class="description last"><p>The type of the parser.<br>
339
- Can be one of <code>markdown</code>, <code>html</code>, <code>bbcode</code>, or <code>plain</code>.<br>
340
- If the <code>template</code> option is provided, this is ignored.</p></td>
341
- </tr>
342
-
343
-
344
-
345
- <tr>
346
-
347
- <td class="name"><code>match</code></td>
348
-
349
-
350
- <td class="type">
351
-
352
-
353
- <span class="param-type">RegExp</span>
354
-
355
-
356
-
357
-
358
- </td>
359
-
360
-
361
- <td class="attributes">
362
-
363
- &lt;optional><br>
364
-
365
-
366
-
367
-
368
-
369
- </td>
370
-
371
-
372
-
373
- <td class="default">
374
-
375
- <code>/:(.+?):/g</code>
376
-
377
- </td>
378
-
379
-
380
- <td class="description last"><p>The regular expression that matches an emote.<br>
381
- Must be a global regex, with one capture group for the emote code.</p></td>
382
- </tr>
383
-
384
-
385
- </tbody>
386
- </table>
387
-
388
- </td>
389
- </tr>
390
-
391
-
392
- </tbody>
393
- </table>
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
-
412
-
413
-
414
- </div>
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
- <h3 class="subsection-title">Members</h3>
431
-
432
-
433
-
434
- <h4 class="name" id="fetcher"><span class="type-signature"></span>fetcher<span class="type-signature"> :<a href="EmoteFetcher.html">EmoteFetcher</a></span></h4>
435
-
436
-
437
-
438
-
439
-
440
- <dl class="details">
441
-
442
- <dt class="tag-description">Description:</dt>
443
- <dd class="tag-description"><ul class="dummy"><li><p>The emote fetcher being used.</p></li></ul></dd>
444
-
445
-
446
-
447
- <dt class="tag-source">Source:</dt>
448
- <dd class="tag-source"><ul class="dummy"><li>
449
- <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line25">line 25</a>
450
- </li></ul></dd>
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
-
481
-
482
- </dl>
483
-
484
-
485
-
486
-
487
-
488
- <div class="description usertext">
489
- <p>The emote fetcher being used.</p>
490
- </div>
491
-
492
-
493
-
494
- <h5 class="h5-types">Type:</h5>
495
- <ul>
496
- <li>
497
-
498
- <span class="param-type"><a href="EmoteFetcher.html">EmoteFetcher</a></span>
499
-
500
-
501
-
502
- </li>
503
- </ul>
504
-
505
-
506
-
507
-
508
-
509
-
510
-
511
-
512
- <h4 class="name" id="options"><span class="type-signature"></span>options<span class="type-signature"> :object</span></h4>
513
-
514
-
515
-
516
-
517
-
518
- <dl class="details">
519
-
520
- <dt class="tag-description">Description:</dt>
521
- <dd class="tag-description"><ul class="dummy"><li><p>The parser options.</p></li></ul></dd>
522
-
523
-
524
-
525
- <dt class="tag-source">Source:</dt>
526
- <dd class="tag-source"><ul class="dummy"><li>
527
- <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line31">line 31</a>
528
- </li></ul></dd>
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
-
559
-
560
- </dl>
561
-
562
-
563
-
564
-
565
-
566
- <div class="description usertext">
567
- <p>The parser options.</p>
568
- </div>
569
-
570
-
571
-
572
- <h5 class="h5-types">Type:</h5>
573
- <ul>
574
- <li>
575
-
576
- <span class="param-type">object</span>
577
-
578
-
579
-
580
- </li>
581
- </ul>
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
-
591
-
592
- <h3 class="subsection-title">Methods</h3>
593
-
594
-
595
-
596
-
597
-
598
-
599
- <h4 class="name" id="_validateOptions"><span class="type-signature type-signature-private">(private) </span>_validateOptions<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
600
-
601
-
602
-
603
-
604
-
605
-
606
- <dl class="details">
607
-
608
- <dt class="tag-description">Description:</dt>
609
- <dd class="tag-description"><ul class="dummy"><li><p>Validates the parser options.</p></li></ul></dd>
610
-
611
-
612
-
613
- <dt class="tag-source">Source:</dt>
614
- <dd class="tag-source"><ul class="dummy"><li>
615
- <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line59">line 59</a>
616
- </li></ul></dd>
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
-
647
-
648
- </dl>
649
-
650
-
651
-
652
-
653
-
654
-
655
-
656
-
657
-
658
-
659
-
660
-
661
-
662
- <h5 class="h5-parameters">Parameters:</h5>
663
-
664
-
665
- <table class="params">
666
- <thead>
667
- <tr>
668
-
669
- <th>Name</th>
670
-
671
-
672
- <th>Type</th>
673
-
674
-
675
- <th>Attributes</th>
676
-
677
-
678
-
679
-
680
- <th class="last">Description</th>
681
- </tr>
682
- </thead>
683
-
684
- <tbody>
685
-
686
-
687
- <tr>
688
-
689
- <td class="name"><code>options</code></td>
690
-
691
-
692
- <td class="type">
693
-
694
-
695
- <span class="param-type">object</span>
696
-
697
-
698
-
699
-
700
- </td>
701
-
702
-
703
- <td class="attributes">
704
-
705
- &lt;optional><br>
706
-
707
-
708
-
709
-
710
-
711
- </td>
712
-
713
-
714
-
715
-
716
- <td class="description last"><p>Options for the parser.</p>
717
- <h6>Properties</h6>
718
-
719
-
720
- <table class="params">
721
- <thead>
722
- <tr>
723
-
724
- <th>Name</th>
725
-
726
-
727
- <th>Type</th>
728
-
729
-
730
- <th>Attributes</th>
731
-
732
-
733
-
734
-
735
- <th class="last">Description</th>
736
- </tr>
737
- </thead>
738
-
739
- <tbody>
740
-
741
-
742
- <tr>
743
-
744
- <td class="name"><code>template</code></td>
745
-
746
-
747
- <td class="type">
748
-
749
-
750
- <span class="param-type">string</span>
751
-
752
-
753
-
754
-
755
- </td>
756
-
757
-
758
- <td class="attributes">
759
-
760
- &lt;optional><br>
761
-
762
-
763
-
764
-
765
-
766
- </td>
767
-
768
-
769
-
770
-
771
- <td class="description last"><p>The template to be used.<br>
772
- The strings that can be interpolated are:</p>
773
- <ul>
774
- <li><code>{link}</code> The link of the emote.</li>
775
- <li><code>{name}</code> The name of the emote.</li>
776
- <li><code>{size}</code> The size of the image.</li>
777
- <li><code>{creator}</code> The channel/owner name of the emote.</li>
778
- </ul></td>
779
- </tr>
780
-
781
-
782
-
783
- <tr>
784
-
785
- <td class="name"><code>type</code></td>
786
-
787
-
788
- <td class="type">
789
-
790
-
791
- <span class="param-type">string</span>
792
-
793
-
794
-
795
-
796
- </td>
797
-
798
-
799
- <td class="attributes">
800
-
801
- &lt;optional><br>
802
-
803
-
804
-
805
-
806
-
807
- </td>
808
-
809
-
810
-
811
-
812
- <td class="description last"><p>The type of the parser.<br>
813
- Can be one of <code>markdown</code>, <code>html</code>, <code>bbcode</code>, or <code>plain</code>.<br>
814
- If the <code>template</code> option is provided, this is ignored.</p></td>
815
- </tr>
816
-
817
-
818
-
819
- <tr>
820
-
821
- <td class="name"><code>match</code></td>
822
-
823
-
824
- <td class="type">
825
-
826
-
827
- <span class="param-type">RegExp</span>
828
-
829
-
830
-
831
-
832
- </td>
833
-
834
-
835
- <td class="attributes">
836
-
837
- &lt;optional><br>
838
-
839
-
840
-
841
-
842
-
843
- </td>
844
-
845
-
846
-
847
-
848
- <td class="description last"><p>The regular expression that matches an emote.<br>
849
- Must be a global regex, with one capture group for the emote code.</p></td>
850
- </tr>
851
-
852
-
853
- </tbody>
854
- </table>
855
-
856
- </td>
857
- </tr>
858
-
859
-
860
- </tbody>
861
- </table>
862
-
863
-
864
-
865
-
866
-
867
-
868
-
869
-
870
-
871
-
872
-
873
-
874
-
875
-
876
- <h5 class="h5-throws">Throws:</h5>
877
- <ul>
878
- <li>
879
-
880
- <dl>
881
- <dt>
882
- <div class="param-desc usertext">
883
- <p>When template is not a string.</p>
884
- </div>
885
- </dt>
886
- <dd></dd>
887
- <dt>
888
- <dl class="param-type">
889
- <dt>
890
- Type
891
- </dt>
892
- <dd>
893
-
894
- <span class="param-type">TypeError</span>
895
-
896
-
897
-
898
- </dd>
899
- </dl>
900
- </dt>
901
- <dd></dd>
902
- </dl>
903
-
904
- </li>
905
-
906
- <li>
907
-
908
- <dl>
909
- <dt>
910
- <div class="param-desc usertext">
911
- <p>When type is not one of the supported types.</p>
912
- </div>
913
- </dt>
914
- <dd></dd>
915
- <dt>
916
- <dl class="param-type">
917
- <dt>
918
- Type
919
- </dt>
920
- <dd>
921
-
922
- <span class="param-type">TypeError</span>
923
-
924
-
925
-
926
- </dd>
927
- </dl>
928
- </dt>
929
- <dd></dd>
930
- </dl>
931
-
932
- </li>
933
-
934
- <li>
935
-
936
- <dl>
937
- <dt>
938
- <div class="param-desc usertext">
939
- <p>When match is not a global RegExp.</p>
940
- </div>
941
- </dt>
942
- <dd></dd>
943
- <dt>
944
- <dl class="param-type">
945
- <dt>
946
- Type
947
- </dt>
948
- <dd>
949
-
950
- <span class="param-type">TypeError</span>
951
-
952
-
953
-
954
- </dd>
955
- </dl>
956
- </dt>
957
- <dd></dd>
958
- </dl>
959
-
960
- </li>
961
- </ul>
962
-
963
-
964
-
965
-
966
-
967
-
968
-
969
-
970
-
971
-
972
- <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>
973
-
974
-
975
-
976
-
977
-
978
-
979
- <dl class="details">
980
-
981
- <dt class="tag-description">Description:</dt>
982
- <dd class="tag-description"><ul class="dummy"><li><p>Parses text.</p></li></ul></dd>
983
-
984
-
985
-
986
- <dt class="tag-source">Source:</dt>
987
- <dd class="tag-source"><ul class="dummy"><li>
988
- <a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line79">line 79</a>
989
- </li></ul></dd>
990
-
991
-
992
-
993
-
994
-
995
-
996
-
997
-
998
-
999
-
1000
-
1001
-
1002
-
1003
-
1004
-
1005
-
1006
-
1007
-
1008
-
1009
-
1010
-
1011
-
1012
-
1013
-
1014
-
1015
-
1016
-
1017
-
1018
-
1019
-
1020
-
1021
- </dl>
1022
-
1023
-
1024
-
1025
-
1026
-
1027
-
1028
-
1029
-
1030
-
1031
-
1032
-
1033
-
1034
-
1035
- <h5 class="h5-parameters">Parameters:</h5>
1036
-
1037
-
1038
- <table class="params">
1039
- <thead>
1040
- <tr>
1041
-
1042
- <th>Name</th>
1043
-
1044
-
1045
- <th>Type</th>
1046
-
1047
-
1048
-
1049
-
1050
- <th>Default</th>
1051
-
1052
-
1053
- <th class="last">Description</th>
1054
- </tr>
1055
- </thead>
1056
-
1057
- <tbody>
1058
-
1059
-
1060
- <tr>
1061
-
1062
- <td class="name"><code>text</code></td>
1063
-
1064
-
1065
- <td class="type">
1066
-
1067
-
1068
- <span class="param-type">string</span>
1069
-
1070
-
1071
-
1072
-
1073
- </td>
1074
-
1075
-
1076
-
1077
-
1078
- <td class="default">
1079
-
1080
- </td>
1081
-
1082
-
1083
- <td class="description last"><p>Text to parse.</p></td>
1084
- </tr>
1085
-
1086
-
1087
-
1088
- <tr>
1089
-
1090
- <td class="name"><code>size</code></td>
1091
-
1092
-
1093
- <td class="type">
1094
-
1095
-
1096
- <span class="param-type">number</span>
1097
-
1098
-
1099
-
1100
-
1101
- </td>
1102
-
1103
-
1104
-
1105
-
1106
- <td class="default">
1107
-
1108
- <code>0</code>
1109
-
1110
- </td>
1111
-
1112
-
1113
- <td class="description last"><p>Size for emotes.</p></td>
1114
- </tr>
1115
-
1116
-
1117
- </tbody>
1118
- </table>
1119
-
1120
-
1121
-
1122
-
1123
-
1124
-
1125
-
1126
-
1127
-
1128
-
1129
-
1130
-
1131
-
1132
-
1133
-
1134
-
1135
- <h5 class="h5-returns">Returns:</h5>
1136
-
1137
-
1138
-
1139
-
1140
- <dl class="param-type">
1141
- <dt>
1142
- Type
1143
- </dt>
1144
- <dd>
1145
-
1146
- <span class="param-type">string</span>
1147
-
1148
-
1149
-
1150
- </dd>
1151
- </dl>
1152
-
1153
-
1154
-
1155
-
1156
-
1157
-
1158
-
1159
-
1160
-
1161
-
1162
-
1163
- </article>
1164
-
1165
- </section>
1166
-
1167
-
1168
-
1169
-
1170
-
1171
-
1172
- </div>
1173
-
1174
- <br class="clear">
1175
-
1176
- <footer>
1177
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1178
- </footer>
1179
-
1180
- <script>prettyPrint();</script>
1181
- <script src="scripts/polyfill.js"></script>
1182
- <script src="scripts/linenumber.js"></script>
1183
-
1184
-
1185
-
1186
- </body>
1187
- </html>