@@ -6,6 +6,84 @@ EXPORT_ROUTER.get("/:version", async (c) => {
6
6
const version = c . req . param ( "version" ) ;
7
7
8
8
async function findCorrectVersion ( version : string ) {
9
+ if ( version === "1.0" ) {
10
+ return await import ( `../../.emoji-data/v1.0/groups.json` , {
11
+ with : { type : "json" } ,
12
+ } ) . then ( ( mod ) => mod . default ) ;
13
+ }
14
+
15
+ if ( version === "2.0" ) {
16
+ return await import ( `../../.emoji-data/v2.0/groups.json` , {
17
+ with : { type : "json" } ,
18
+ } ) . then ( ( mod ) => mod . default ) ;
19
+ }
20
+
21
+ if ( version === "3.0" ) {
22
+ return await import ( `../../.emoji-data/v3.0/groups.json` , {
23
+ with : { type : "json" } ,
24
+ } ) . then ( ( mod ) => mod . default ) ;
25
+ }
26
+
27
+ if ( version === "4.0" ) {
28
+ return await import ( `../../.emoji-data/v4.0/groups.json` , {
29
+ with : { type : "json" } ,
30
+ } ) . then ( ( mod ) => mod . default ) ;
31
+ }
32
+
33
+ if ( version === "5.0" ) {
34
+ return await import ( `../../.emoji-data/v5.0/groups.json` , {
35
+ with : { type : "json" } ,
36
+ } ) . then ( ( mod ) => mod . default ) ;
37
+ }
38
+
39
+ if ( version === "11.0" ) {
40
+ return await import ( `../../.emoji-data/v11.0/groups.json` , {
41
+ with : { type : "json" } ,
42
+ } ) . then ( ( mod ) => mod . default ) ;
43
+ }
44
+
45
+ if ( version === "12.0" ) {
46
+ return await import ( `../../.emoji-data/v12.0/groups.json` , {
47
+ with : { type : "json" } ,
48
+ } ) . then ( ( mod ) => mod . default ) ;
49
+ }
50
+
51
+ if ( version === "12.1" ) {
52
+ return await import ( `../../.emoji-data/v12.1/groups.json` , {
53
+ with : { type : "json" } ,
54
+ } ) . then ( ( mod ) => mod . default ) ;
55
+ }
56
+
57
+ if ( version === "13.0" ) {
58
+ return await import ( `../../.emoji-data/v13.0/groups.json` , {
59
+ with : { type : "json" } ,
60
+ } ) . then ( ( mod ) => mod . default ) ;
61
+ }
62
+
63
+ if ( version === "13.1" ) {
64
+ return await import ( `../../.emoji-data/v13.1/groups.json` , {
65
+ with : { type : "json" } ,
66
+ } ) . then ( ( mod ) => mod . default ) ;
67
+ }
68
+
69
+ if ( version === "14.0" ) {
70
+ return await import ( `../../.emoji-data/v14.0/groups.json` , {
71
+ with : { type : "json" } ,
72
+ } ) . then ( ( mod ) => mod . default ) ;
73
+ }
74
+
75
+ if ( version === "15.0" ) {
76
+ return await import ( `../../.emoji-data/v15.0/groups.json` , {
77
+ with : { type : "json" } ,
78
+ } ) . then ( ( mod ) => mod . default ) ;
79
+ }
80
+
81
+ if ( version === "15.1" ) {
82
+ return await import ( `../../.emoji-data/v15.1/groups.json` , {
83
+ with : { type : "json" } ,
84
+ } ) . then ( ( mod ) => mod . default ) ;
85
+ }
86
+
9
87
if ( version === "16.0" ) {
10
88
return await import ( `../../.emoji-data/v16.0/groups.json` , {
11
89
with : { type : "json" } ,
0 commit comments