emojistry 1.0.0

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/README.md ADDED
@@ -0,0 +1,151 @@
1
+ # emojistry
2
+
3
+ [![NPM Version](https://img.shields.io/npm/v/emojistry)](https://www.npmjs.com/package/emojistry)
4
+ [![API health](https://img.shields.io/endpoint?url=https%3A%2F%2Fapi.emojistry.kfiros.com%2Fhealth%2Fbadge)](https://api.emojistry.kfiros.com/health)
5
+
6
+ App-friendly emoji data, search helpers, and a hosted REST API backed by Unicode emoji data.
7
+
8
+ Emojistry provides a versioned emoji registry with normalized names, codepoints, Unicode groups, app categories, keywords, skin-tone metadata, and sequence metadata.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install emojistry
14
+ ```
15
+
16
+ ```bash
17
+ bun add emojistry
18
+ ```
19
+
20
+ ## Package Usage
21
+
22
+ Use the generated registry data directly from the package:
23
+
24
+ ```ts
25
+ import snapshot from "emojistry/data";
26
+ import { groupByCategory, searchEmojis } from "emojistry";
27
+
28
+ const hearts = searchEmojis(snapshot.emojis, "heart");
29
+ const faces = groupByCategory(snapshot.emojis).faces;
30
+ ```
31
+
32
+ Find a single emoji by emoji, slug, exact name, or codepoint:
33
+
34
+ ```ts
35
+ import snapshot from "emojistry/data";
36
+ import { findEmoji } from "emojistry";
37
+
38
+ const rocket = findEmoji(snapshot.emojis, "rocket");
39
+ const grinning = findEmoji(snapshot.emojis, "U+1F600");
40
+ ```
41
+
42
+ Parse and normalize Unicode `emoji-test.txt` data:
43
+
44
+ ```ts
45
+ import { normalizeEmojiEntries, parseEmojiTest } from "emojistry";
46
+
47
+ const source = await fetch("https://unicode.org/Public/emoji/latest/emoji-test.txt").then((res) =>
48
+ res.text(),
49
+ );
50
+ const emojis = normalizeEmojiEntries(parseEmojiTest(source));
51
+ ```
52
+
53
+ ## Data Shape
54
+
55
+ ```ts
56
+ interface EmojiRecord {
57
+ emoji: string;
58
+ codepoints: string[];
59
+ qualification: "fully-qualified" | "minimally-qualified" | "unqualified" | "component";
60
+ emojiVersion: string;
61
+ name: string;
62
+ group: string;
63
+ subgroup: string;
64
+ slug: string;
65
+ category: EmojiCategory;
66
+ keywords: string[];
67
+ hasSkinTone: boolean;
68
+ isSequence: boolean;
69
+ }
70
+ ```
71
+
72
+ ## REST API
73
+
74
+ Hosted API:
75
+
76
+ ```text
77
+ https://api.emojistry.kfiros.com
78
+ ```
79
+
80
+ ### Endpoints
81
+
82
+ ```http
83
+ GET /health
84
+ GET /health/badge
85
+ GET /v1
86
+ GET /v1/emojis
87
+ GET /v1/emojis/:emoji-or-slug-or-codepoint
88
+ GET /v1/search?q=heart
89
+ GET /v1/categories
90
+ GET /v1/categories/:category/emojis
91
+ ```
92
+
93
+ List endpoints support:
94
+
95
+ ```text
96
+ limit=100
97
+ offset=0
98
+ ```
99
+
100
+ `GET /v1/emojis` also supports:
101
+
102
+ ```text
103
+ q=heart
104
+ category=faces
105
+ group=Smileys%20%26%20Emotion
106
+ subgroup=face-smiling
107
+ ```
108
+
109
+ ### Examples
110
+
111
+ ```bash
112
+ curl https://api.emojistry.kfiros.com/health
113
+ ```
114
+
115
+ ```bash
116
+ curl https://api.emojistry.kfiros.com/health/badge
117
+ ```
118
+
119
+ ```bash
120
+ curl "https://api.emojistry.kfiros.com/v1/search?q=heart&limit=3"
121
+ ```
122
+
123
+ ```bash
124
+ curl https://api.emojistry.kfiros.com/v1/emojis/grinning-face
125
+ ```
126
+
127
+ ## Categories
128
+
129
+ Emojistry maps Unicode groups to app-friendly categories:
130
+
131
+ ```text
132
+ faces
133
+ people
134
+ animals-nature
135
+ food-drink
136
+ travel-places
137
+ activities
138
+ objects
139
+ symbols
140
+ flags
141
+ components
142
+ other
143
+ ```
144
+
145
+ ## Development
146
+
147
+ Project setup, data generation, package publishing, and deployment notes live in [docs/development.md](docs/development.md) and [docs/deployment.md](docs/deployment.md).
148
+
149
+ ## License
150
+
151
+ MIT