@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,798 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>Collection - 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">Collection</h1>
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
- <section>
47
-
48
- <header>
49
-
50
- <h2>
51
-
52
- Collection
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="Collection"><span class="type-signature"></span>new Collection<span class="signature">()</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>An extended Map with utility methods.</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="util_Collection.js.html">util/Collection.js</a>, <a href="util_Collection.js.html#line2">line 2</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
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- </div>
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
- <h3 class="subsection-title">Methods</h3>
167
-
168
-
169
-
170
-
171
-
172
-
173
- <h4 class="name" id="find"><span class="type-signature"></span>find<span class="signature">(propOrFunc, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {any}</span></h4>
174
-
175
-
176
-
177
-
178
-
179
-
180
- <dl class="details">
181
-
182
- <dt class="tag-description">Description:</dt>
183
- <dd class="tag-description"><ul class="dummy"><li><p>Finds first matching value by property or function.<br>
184
- Same as <code>Array#find</code>.</p></li></ul></dd>
185
-
186
-
187
-
188
- <dt class="tag-source">Source:</dt>
189
- <dd class="tag-source"><ul class="dummy"><li>
190
- <a href="util_Collection.js.html">util/Collection.js</a>, <a href="util_Collection.js.html#line14">line 14</a>
191
- </li></ul></dd>
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
- </dl>
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
- <h5 class="h5-parameters">Parameters:</h5>
238
-
239
-
240
- <table class="params">
241
- <thead>
242
- <tr>
243
-
244
- <th>Name</th>
245
-
246
-
247
- <th>Type</th>
248
-
249
-
250
- <th>Attributes</th>
251
-
252
-
253
-
254
-
255
- <th class="last">Description</th>
256
- </tr>
257
- </thead>
258
-
259
- <tbody>
260
-
261
-
262
- <tr>
263
-
264
- <td class="name"><code>propOrFunc</code></td>
265
-
266
-
267
- <td class="type">
268
-
269
-
270
- <span class="param-type">string</span>
271
- |
272
-
273
- <span class="param-type">function</span>
274
-
275
-
276
-
277
-
278
- </td>
279
-
280
-
281
- <td class="attributes">
282
-
283
-
284
-
285
-
286
-
287
- </td>
288
-
289
-
290
-
291
-
292
- <td class="description last"><p>Property or function to test.</p></td>
293
- </tr>
294
-
295
-
296
-
297
- <tr>
298
-
299
- <td class="name"><code>value</code></td>
300
-
301
-
302
- <td class="type">
303
-
304
-
305
- <span class="param-type">any</span>
306
-
307
-
308
-
309
-
310
- </td>
311
-
312
-
313
- <td class="attributes">
314
-
315
- &lt;optional><br>
316
-
317
-
318
-
319
-
320
-
321
- </td>
322
-
323
-
324
-
325
-
326
- <td class="description last"><p>Value to find.</p></td>
327
- </tr>
328
-
329
-
330
- </tbody>
331
- </table>
332
-
333
-
334
-
335
-
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
-
346
-
347
-
348
- <h5 class="h5-returns">Returns:</h5>
349
-
350
-
351
-
352
-
353
- <dl class="param-type">
354
- <dt>
355
- Type
356
- </dt>
357
- <dd>
358
-
359
- <span class="param-type">any</span>
360
-
361
-
362
-
363
- </dd>
364
- </dl>
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
- <h4 class="name" id="filter"><span class="type-signature"></span>filter<span class="signature">(func, thisArg<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Collection.html">Collection</a>}</span></h4>
376
-
377
-
378
-
379
-
380
-
381
-
382
- <dl class="details">
383
-
384
- <dt class="tag-description">Description:</dt>
385
- <dd class="tag-description"><ul class="dummy"><li><p>Filters cache by function.<br>
386
- Same as <code>Array#filter</code>.</p></li></ul></dd>
387
-
388
-
389
-
390
- <dt class="tag-source">Source:</dt>
391
- <dd class="tag-source"><ul class="dummy"><li>
392
- <a href="util_Collection.js.html">util/Collection.js</a>, <a href="util_Collection.js.html#line44">line 44</a>
393
- </li></ul></dd>
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
-
412
-
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
- </dl>
426
-
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
-
435
-
436
-
437
-
438
-
439
- <h5 class="h5-parameters">Parameters:</h5>
440
-
441
-
442
- <table class="params">
443
- <thead>
444
- <tr>
445
-
446
- <th>Name</th>
447
-
448
-
449
- <th>Type</th>
450
-
451
-
452
- <th>Attributes</th>
453
-
454
-
455
-
456
-
457
- <th class="last">Description</th>
458
- </tr>
459
- </thead>
460
-
461
- <tbody>
462
-
463
-
464
- <tr>
465
-
466
- <td class="name"><code>func</code></td>
467
-
468
-
469
- <td class="type">
470
-
471
-
472
- <span class="param-type">function</span>
473
-
474
-
475
-
476
-
477
- </td>
478
-
479
-
480
- <td class="attributes">
481
-
482
-
483
-
484
-
485
-
486
- </td>
487
-
488
-
489
-
490
-
491
- <td class="description last"><p>Function to test.</p></td>
492
- </tr>
493
-
494
-
495
-
496
- <tr>
497
-
498
- <td class="name"><code>thisArg</code></td>
499
-
500
-
501
- <td class="type">
502
-
503
-
504
- <span class="param-type">any</span>
505
-
506
-
507
-
508
-
509
- </td>
510
-
511
-
512
- <td class="attributes">
513
-
514
- &lt;optional><br>
515
-
516
-
517
-
518
-
519
-
520
- </td>
521
-
522
-
523
-
524
-
525
- <td class="description last"><p>The context for the function.</p></td>
526
- </tr>
527
-
528
-
529
- </tbody>
530
- </table>
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
-
540
-
541
-
542
-
543
-
544
-
545
-
546
-
547
- <h5 class="h5-returns">Returns:</h5>
548
-
549
-
550
-
551
-
552
- <dl class="param-type">
553
- <dt>
554
- Type
555
- </dt>
556
- <dd>
557
-
558
- <span class="param-type"><a href="Collection.html">Collection</a></span>
559
-
560
-
561
-
562
- </dd>
563
- </dl>
564
-
565
-
566
-
567
-
568
-
569
-
570
-
571
-
572
-
573
-
574
- <h4 class="name" id="map"><span class="type-signature"></span>map<span class="signature">(func, thisArg<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;any>}</span></h4>
575
-
576
-
577
-
578
-
579
-
580
-
581
- <dl class="details">
582
-
583
- <dt class="tag-description">Description:</dt>
584
- <dd class="tag-description"><ul class="dummy"><li><p>Maps cache by function.<br>
585
- Same as <code>Array#map</code>.</p></li></ul></dd>
586
-
587
-
588
-
589
- <dt class="tag-source">Source:</dt>
590
- <dd class="tag-source"><ul class="dummy"><li>
591
- <a href="util_Collection.js.html">util/Collection.js</a>, <a href="util_Collection.js.html#line65">line 65</a>
592
- </li></ul></dd>
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
-
609
-
610
-
611
-
612
-
613
-
614
-
615
-
616
-
617
-
618
-
619
-
620
-
621
-
622
-
623
-
624
- </dl>
625
-
626
-
627
-
628
-
629
-
630
-
631
-
632
-
633
-
634
-
635
-
636
-
637
-
638
- <h5 class="h5-parameters">Parameters:</h5>
639
-
640
-
641
- <table class="params">
642
- <thead>
643
- <tr>
644
-
645
- <th>Name</th>
646
-
647
-
648
- <th>Type</th>
649
-
650
-
651
- <th>Attributes</th>
652
-
653
-
654
-
655
-
656
- <th class="last">Description</th>
657
- </tr>
658
- </thead>
659
-
660
- <tbody>
661
-
662
-
663
- <tr>
664
-
665
- <td class="name"><code>func</code></td>
666
-
667
-
668
- <td class="type">
669
-
670
-
671
- <span class="param-type">function</span>
672
-
673
-
674
-
675
-
676
- </td>
677
-
678
-
679
- <td class="attributes">
680
-
681
-
682
-
683
-
684
-
685
- </td>
686
-
687
-
688
-
689
-
690
- <td class="description last"><p>Function to use.</p></td>
691
- </tr>
692
-
693
-
694
-
695
- <tr>
696
-
697
- <td class="name"><code>thisArg</code></td>
698
-
699
-
700
- <td class="type">
701
-
702
-
703
- <span class="param-type">any</span>
704
-
705
-
706
-
707
-
708
- </td>
709
-
710
-
711
- <td class="attributes">
712
-
713
- &lt;optional><br>
714
-
715
-
716
-
717
-
718
-
719
- </td>
720
-
721
-
722
-
723
-
724
- <td class="description last"><p>The context for the function.</p></td>
725
- </tr>
726
-
727
-
728
- </tbody>
729
- </table>
730
-
731
-
732
-
733
-
734
-
735
-
736
-
737
-
738
-
739
-
740
-
741
-
742
-
743
-
744
-
745
-
746
- <h5 class="h5-returns">Returns:</h5>
747
-
748
-
749
-
750
-
751
- <dl class="param-type">
752
- <dt>
753
- Type
754
- </dt>
755
- <dd>
756
-
757
- <span class="param-type">Array.&lt;any></span>
758
-
759
-
760
-
761
- </dd>
762
- </dl>
763
-
764
-
765
-
766
-
767
-
768
-
769
-
770
-
771
-
772
-
773
-
774
- </article>
775
-
776
- </section>
777
-
778
-
779
-
780
-
781
-
782
-
783
- </div>
784
-
785
- <br class="clear">
786
-
787
- <footer>
788
- 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.
789
- </footer>
790
-
791
- <script>prettyPrint();</script>
792
- <script src="scripts/polyfill.js"></script>
793
- <script src="scripts/linenumber.js"></script>
794
-
795
-
796
-
797
- </body>
798
- </html>