@mkody/twitch-emoticons 2.9.3 → 2.9.5
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/.jsdoc.json +12 -5
- package/.nvmrc +1 -1
- package/dist/TwitchEmoticons.min.js +11 -11
- package/dist/TwitchEmoticons.min.js.map +4 -4
- package/docs/BTTVEmote.html +72 -72
- package/docs/Channel.html +19 -19
- package/docs/Collection.html +25 -25
- package/docs/Emote.html +63 -33
- package/docs/EmoteFetcher.html +426 -366
- package/docs/EmoteParser.html +378 -3
- package/docs/FFZEmote.html +82 -82
- package/docs/SevenTVEmote.html +77 -77
- package/docs/TwitchEmote.html +68 -68
- package/docs/index.html +3 -3
- package/docs/struct_BTTVEmote.js.html +2 -2
- package/docs/struct_Channel.js.html +2 -2
- package/docs/struct_Emote.js.html +3 -2
- package/docs/struct_EmoteFetcher.js.html +4 -2
- package/docs/struct_EmoteParser.js.html +22 -3
- package/docs/struct_FFZEmote.js.html +2 -2
- package/docs/struct_SevenTVEmote.js.html +2 -2
- package/docs/struct_TwitchEmote.js.html +2 -2
- package/docs/util_Collection.js.html +4 -3
- package/package.json +14 -14
- package/src/struct/Emote.js +1 -0
- package/src/struct/EmoteFetcher.js +2 -0
- package/src/struct/EmoteParser.js +20 -1
- package/src/util/Collection.js +1 -0
- package/test/SevenTV.test.js +4 -4
- package/test/__snapshots__/ToFromObject.test.js.snap +1 -1
- package/test/other.test.js +60 -1
- package/typings/index.d.ts +4 -4
- package/docs/SevenTV.html +0 -1191
package/docs/EmoteParser.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
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</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="
|
|
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
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -283,6 +283,8 @@
|
|
|
283
283
|
|
|
284
284
|
<td class="default">
|
|
285
285
|
|
|
286
|
+
<code>''</code>
|
|
287
|
+
|
|
286
288
|
</td>
|
|
287
289
|
|
|
288
290
|
|
|
@@ -594,6 +596,379 @@ Must be a global regex, with one capture group for the emote code.</p></td>
|
|
|
594
596
|
|
|
595
597
|
|
|
596
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
|
+
<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
|
+
<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
|
+
<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
|
+
<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
|
+
|
|
597
972
|
<h4 class="name" id="parse"><span class="type-signature"></span>parse<span class="signature">(text, size)</span><span class="type-signature"> → {string}</span></h4>
|
|
598
973
|
|
|
599
974
|
|
|
@@ -610,7 +985,7 @@ Must be a global regex, with one capture group for the emote code.</p></td>
|
|
|
610
985
|
|
|
611
986
|
<dt class="tag-source">Source:</dt>
|
|
612
987
|
<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#
|
|
988
|
+
<a href="struct_EmoteParser.js.html">struct/EmoteParser.js</a>, <a href="struct_EmoteParser.js.html#line79">line 79</a>
|
|
614
989
|
</li></ul></dd>
|
|
615
990
|
|
|
616
991
|
|
|
@@ -799,7 +1174,7 @@ Must be a global regex, with one capture group for the emote code.</p></td>
|
|
|
799
1174
|
<br class="clear">
|
|
800
1175
|
|
|
801
1176
|
<footer>
|
|
802
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
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.
|
|
803
1178
|
</footer>
|
|
804
1179
|
|
|
805
1180
|
<script>prettyPrint();</script>
|