@mkody/twitch-emoticons 2.8.4 → 2.8.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/.nvmrc +1 -1
- package/README.md +2 -0
- package/dist/TwitchEmoticons.min.js +10 -10
- package/dist/TwitchEmoticons.min.js.map +4 -4
- package/docs/index.html +3 -1
- package/package.json +13 -10
- package/test/SevenTV.test.js +4 -4
- package/test/__snapshots__/ToFromObject.test.js.snap +2 -2
package/docs/index.html
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<section class="package">
|
|
47
|
-
<h3>@mkody/twitch-emoticons 2.8.
|
|
47
|
+
<h3>@mkody/twitch-emoticons 2.8.5</h3>
|
|
48
48
|
</section>
|
|
49
49
|
|
|
50
50
|
|
|
@@ -70,6 +70,8 @@ If you are only using BetterTTV, FrankerFaceZ and 7TV you don't need to provide
|
|
|
70
70
|
<h3>Install</h3>
|
|
71
71
|
<pre class="prettyprint source lang-sh"><code>npm install @mkody/twitch-emoticons
|
|
72
72
|
# or
|
|
73
|
+
pnpm install @mkody/twitch-emoticons
|
|
74
|
+
# or
|
|
73
75
|
yarn add @mkody/twitch-emoticons
|
|
74
76
|
</code></pre>
|
|
75
77
|
<h3>Examples</h3>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mkody/twitch-emoticons",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.5",
|
|
4
4
|
"description": "Gets Twitch, BTTV, FFZ and 7TV emotes as well as parsing text to emotes!",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "typings/index.d.ts",
|
|
@@ -26,23 +26,24 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@twurple/api": "^7.0.
|
|
30
|
-
"@twurple/auth": "^7.0.
|
|
31
|
-
"axios": "^1.6.
|
|
29
|
+
"@twurple/api": "^7.0.6",
|
|
30
|
+
"@twurple/auth": "^7.0.6",
|
|
31
|
+
"axios": "^1.6.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@jest/globals": "^29.7.0",
|
|
35
35
|
"docdash": "^2.0.2",
|
|
36
|
-
"esbuild": "^0.19.
|
|
37
|
-
"eslint": "^8.
|
|
36
|
+
"esbuild": "^0.19.11",
|
|
37
|
+
"eslint": "^8.56.0",
|
|
38
38
|
"jest": "^29.7.0",
|
|
39
39
|
"jsdoc": "^4.0.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
+
"all": "pnpm run lint && pnpm run test && pnpm run build && pnpm run docs",
|
|
43
|
+
"build": "esbuild ./src/index.js --bundle --minify --keep-names --sourcemap --format=esm --outfile=./dist/TwitchEmoticons.min.js",
|
|
42
44
|
"docs": "jsdoc --configure .jsdoc.json --verbose",
|
|
43
|
-
"test": "jest",
|
|
44
45
|
"lint": "eslint ./src ./test",
|
|
45
|
-
"
|
|
46
|
+
"test": "jest"
|
|
46
47
|
},
|
|
47
48
|
"repository": {
|
|
48
49
|
"type": "git",
|
|
@@ -57,6 +58,8 @@
|
|
|
57
58
|
"test": "test"
|
|
58
59
|
},
|
|
59
60
|
"engines": {
|
|
60
|
-
"node": ">=16.0.0"
|
|
61
|
-
|
|
61
|
+
"node": ">=16.0.0",
|
|
62
|
+
"pnpm": ">=8"
|
|
63
|
+
},
|
|
64
|
+
"packageManager": "pnpm@8.13.1"
|
|
62
65
|
}
|
package/test/SevenTV.test.js
CHANGED
|
@@ -15,12 +15,12 @@ describe('Test 7TV emotes', () => {
|
|
|
15
15
|
|
|
16
16
|
test('Get emote (EZ)', () => {
|
|
17
17
|
const emote = emoteFetcher.emotes.get('EZ');
|
|
18
|
-
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/
|
|
18
|
+
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/6320bf2ad461b9ebf9413812/3x.webp');
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
test('Parse string with emote (EZ)', () => {
|
|
22
22
|
const text = emoteParser.parse('This is a test string with :EZ: in it.');
|
|
23
|
-
expect(text).toBe('This is a test string with .toBe('This is a test string with  in it.');
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -37,12 +37,12 @@ describe('Test 7TV emotes', () => {
|
|
|
37
37
|
|
|
38
38
|
test('Get emote (Clap)', () => {
|
|
39
39
|
const emote = emoteFetcher.emotes.get('Clap');
|
|
40
|
-
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/
|
|
40
|
+
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/636b877aada75990352334c7/3x.avif');
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
test('Parse string with emote (Clap)', () => {
|
|
44
44
|
const text = emoteParser.parse('This is a test string with :Clap: in it.');
|
|
45
|
-
expect(text).toBe('This is a test string with .toBe('This is a test string with  in it.');
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
|
|
@@ -5,9 +5,9 @@ exports[`Test toObject 7TV Global Emote (AVIF) 1`] = `
|
|
|
5
5
|
"animated": false,
|
|
6
6
|
"channel_id": null,
|
|
7
7
|
"code": "EZ",
|
|
8
|
-
"id": "
|
|
8
|
+
"id": "6320bf2ad461b9ebf9413812",
|
|
9
9
|
"imageType": "avif",
|
|
10
|
-
"ownerName": "
|
|
10
|
+
"ownerName": "TrippyColour",
|
|
11
11
|
"sizes": [
|
|
12
12
|
"1x.avif",
|
|
13
13
|
"2x.avif",
|