@involvex/emoji-cli 2.2.7 โ 2.2.8
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,505 @@
|
|
|
1
|
+
# node-emoji
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@involvex/emoji-cli)
|
|
4
|
+
[](https://github.com/omnidan/node-emoji/actions)
|
|
5
|
+
[](https://codecov.io/gh/omnidan/node-emoji)
|
|
6
|
+
[](https://libraries.io/npm/@involvex/emoji-cli)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://nodejs.org/)
|
|
9
|
+
|
|
10
|
+
> Friendly emoji lookups and parsing utilities for Node.js. ๐
|
|
11
|
+
|
|
12
|
+
A comprehensive emoji library for Node.js that provides utilities for parsing, searching, and working with emojis. Features both a JavaScript API and a command-line interface.
|
|
13
|
+
|
|
14
|
+
## ๐ฆ Installation
|
|
15
|
+
|
|
16
|
+
### For Global CLI Usage
|
|
17
|
+
|
|
18
|
+
#### npm
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -g @involvex/emoji-cli
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### yarn
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
yarn global add @involvex/emoji-cli
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
#### pnpm
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add -g @involvex/emoji-cli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### bun
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bun add -g @involvex/emoji-cli
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Without Installation (npx/bunx)
|
|
43
|
+
|
|
44
|
+
You can also use the CLI without installing it globally:
|
|
45
|
+
|
|
46
|
+
#### Using npx (npm)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx @involvex/emoji-cli --search "heart"
|
|
50
|
+
npx @involvex/emoji-cli --get "heart"
|
|
51
|
+
npx @involvex/emoji-cli --random
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Using bunx (bun)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
bunx @involvex/emoji-cli --search "heart"
|
|
58
|
+
bunx @involvex/emoji-cli --get "heart"
|
|
59
|
+
bunx @involvex/emoji-cli --random
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Requirements:** Node.js >= 18
|
|
63
|
+
|
|
64
|
+
## ๐ Quick Start
|
|
65
|
+
|
|
66
|
+
### JavaScript API
|
|
67
|
+
|
|
68
|
+
```javascript
|
|
69
|
+
import { emojify, search, random, get } from '@involvex/emoji-cli'
|
|
70
|
+
|
|
71
|
+
// Convert text with emoji codes to actual emojis
|
|
72
|
+
const text = emojify('I :heart: JavaScript! :tada:')
|
|
73
|
+
console.log(text)
|
|
74
|
+
// Output: "I โค๏ธ JavaScript! ๐"
|
|
75
|
+
|
|
76
|
+
// Search for emojis by name
|
|
77
|
+
const heartEmojis = search('heart')
|
|
78
|
+
console.log(heartEmojis)
|
|
79
|
+
// Output: [{ emoji: 'โค๏ธ', name: 'heart' }, { emoji: '๐', name: 'broken_heart' }, ...]
|
|
80
|
+
|
|
81
|
+
// Get a specific emoji
|
|
82
|
+
const heart = get('heart')
|
|
83
|
+
console.log(heart)
|
|
84
|
+
// Output: 'โค๏ธ'
|
|
85
|
+
|
|
86
|
+
// Get a random emoji
|
|
87
|
+
const randomEmoji = random()
|
|
88
|
+
console.log(randomEmoji)
|
|
89
|
+
// Output: { emoji: '๐', name: 'rainbow' }
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Command Line Interface
|
|
93
|
+
|
|
94
|
+
After installation, you can use the `emoji-cli` command:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Search for emojis
|
|
98
|
+
emoji-cli --search "heart"
|
|
99
|
+
|
|
100
|
+
# Get a specific emoji
|
|
101
|
+
emoji-cli --get "heart"
|
|
102
|
+
|
|
103
|
+
# Convert text to emojis
|
|
104
|
+
emoji-cli --emojify "I love JavaScript!"
|
|
105
|
+
|
|
106
|
+
# Convert emojis back to text
|
|
107
|
+
emoji-cli --unemojify "I โค๏ธ JavaScript!"
|
|
108
|
+
|
|
109
|
+
# Get a random emoji
|
|
110
|
+
emoji-cli --random
|
|
111
|
+
|
|
112
|
+
# Check if an emoji exists
|
|
113
|
+
emoji-cli --has "heart"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## โจ Features
|
|
117
|
+
|
|
118
|
+
- **๐ Powerful Search**: Search emojis by name, keyword, or pattern matching
|
|
119
|
+
- **๐ Text Conversion**: Convert between text with emoji codes and actual emojis
|
|
120
|
+
- **๐ฒ Random Selection**: Get random emojis for variety and fun
|
|
121
|
+
- **๐ง Utility Functions**: Comprehensive set of emoji manipulation utilities
|
|
122
|
+
- **๐ฅ๏ธ CLI Interface**: Command-line tool for emoji operations
|
|
123
|
+
- **๐ฆ Tree Shaking**: Modern ESM module support for better bundling
|
|
124
|
+
- **๐งช Well Tested**: Comprehensive test coverage with Vitest
|
|
125
|
+
- **โก TypeScript**: Full TypeScript support with proper type definitions
|
|
126
|
+
|
|
127
|
+
## ๐ API Documentation
|
|
128
|
+
|
|
129
|
+
### Core Functions
|
|
130
|
+
|
|
131
|
+
#### `emojify(input, options)`
|
|
132
|
+
|
|
133
|
+
Parse markdown-encoded emojis in a string and convert them to actual emoji characters.
|
|
134
|
+
|
|
135
|
+
**Parameters:**
|
|
136
|
+
|
|
137
|
+
- `input` (string): The text containing emoji codes like `:heart:`
|
|
138
|
+
- `options` (object, optional):
|
|
139
|
+
- `fallback` (string | function): Fallback for unknown emoji codes
|
|
140
|
+
- `format` (function): Custom formatting function for matched emojis
|
|
141
|
+
|
|
142
|
+
**Returns:** string
|
|
143
|
+
|
|
144
|
+
**Examples:**
|
|
145
|
+
|
|
146
|
+
```javascript
|
|
147
|
+
import { emojify } from '@involvex/emoji-cli'
|
|
148
|
+
|
|
149
|
+
emojify('Hello :world:!')
|
|
150
|
+
// Output: "Hello ๐!"
|
|
151
|
+
|
|
152
|
+
// With custom fallback
|
|
153
|
+
emojify('I :unknown: this', { fallback: 'โ' })
|
|
154
|
+
// Output: "I โ this"
|
|
155
|
+
|
|
156
|
+
// With custom format function
|
|
157
|
+
emojify('I :heart: this', {
|
|
158
|
+
format: (emoji, code) => `${emoji} (${code})`,
|
|
159
|
+
})
|
|
160
|
+
// Output: "I โค๏ธ (:heart:) this"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### `search(keyword)`
|
|
164
|
+
|
|
165
|
+
Search for emojis by name or pattern.
|
|
166
|
+
|
|
167
|
+
**Parameters:**
|
|
168
|
+
|
|
169
|
+
- `keyword` (string | RegExp): Search term or regular expression
|
|
170
|
+
|
|
171
|
+
**Returns:** Array of `{ emoji, name }` objects
|
|
172
|
+
|
|
173
|
+
**Examples:**
|
|
174
|
+
|
|
175
|
+
```javascript
|
|
176
|
+
import { search } from '@involvex/emoji-cli'
|
|
177
|
+
|
|
178
|
+
search('heart')
|
|
179
|
+
// Output: [{ emoji: 'โค๏ธ', name: 'heart' }, { emoji: '๐', name: 'broken_heart' }]
|
|
180
|
+
|
|
181
|
+
search(/^heart/)
|
|
182
|
+
// Output: All emojis starting with "heart"
|
|
183
|
+
|
|
184
|
+
search('face')
|
|
185
|
+
// Output: All emojis containing "face" in their name
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### `get(codeOrName)`
|
|
189
|
+
|
|
190
|
+
Get an emoji by its code or name.
|
|
191
|
+
|
|
192
|
+
**Parameters:**
|
|
193
|
+
|
|
194
|
+
- `codeOrName` (string): Emoji code (e.g., 'heart') or emoji character
|
|
195
|
+
|
|
196
|
+
**Returns:** string | undefined
|
|
197
|
+
|
|
198
|
+
**Examples:**
|
|
199
|
+
|
|
200
|
+
```javascript
|
|
201
|
+
import { get } from '@involvex/emoji-cli'
|
|
202
|
+
|
|
203
|
+
get('heart')
|
|
204
|
+
// Output: 'โค๏ธ'
|
|
205
|
+
|
|
206
|
+
get('โค๏ธ')
|
|
207
|
+
// Output: 'โค๏ธ'
|
|
208
|
+
|
|
209
|
+
get('non-existent')
|
|
210
|
+
// Output: undefined
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
#### `random()`
|
|
214
|
+
|
|
215
|
+
Get a random emoji.
|
|
216
|
+
|
|
217
|
+
**Returns:** `{ emoji, name }` object
|
|
218
|
+
|
|
219
|
+
**Examples:**
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
import { random } from '@involvex/emoji-cli'
|
|
223
|
+
|
|
224
|
+
random()
|
|
225
|
+
// Output: { emoji: '๐', name: 'rainbow' }
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
#### `replace(input, replacement, options)`
|
|
229
|
+
|
|
230
|
+
Replace emojis in a string with custom replacements.
|
|
231
|
+
|
|
232
|
+
**Parameters:**
|
|
233
|
+
|
|
234
|
+
- `input` (string): Input text containing emojis
|
|
235
|
+
- `replacement` (string | function): Replacement text or function
|
|
236
|
+
- `options` (object, optional):
|
|
237
|
+
- `preserveSpaces` (boolean): Whether to preserve spaces after emojis
|
|
238
|
+
|
|
239
|
+
**Returns:** string
|
|
240
|
+
|
|
241
|
+
**Examples:**
|
|
242
|
+
|
|
243
|
+
```javascript
|
|
244
|
+
import { replace } from '@involvex/emoji-cli'
|
|
245
|
+
|
|
246
|
+
replace('I โค๏ธ JavaScript!', '[EMOJI]')
|
|
247
|
+
// Output: "I [EMOJI] JavaScript!"
|
|
248
|
+
|
|
249
|
+
replace('I โค๏ธ JavaScript!', (emoji, index) => `[${emoji.name}]`)
|
|
250
|
+
// Output: "I [heart] JavaScript!"
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
#### `strip(input)`
|
|
254
|
+
|
|
255
|
+
Remove all emojis from a string.
|
|
256
|
+
|
|
257
|
+
**Parameters:**
|
|
258
|
+
|
|
259
|
+
- `input` (string): Input text
|
|
260
|
+
|
|
261
|
+
**Returns:** string
|
|
262
|
+
|
|
263
|
+
**Examples:**
|
|
264
|
+
|
|
265
|
+
```javascript
|
|
266
|
+
import { strip } from '@involvex/emoji-cli'
|
|
267
|
+
|
|
268
|
+
strip('I โค๏ธ JavaScript! ๐')
|
|
269
|
+
// Output: "I JavaScript!"
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
#### `unemojify(input)`
|
|
273
|
+
|
|
274
|
+
Convert emojis back to their markdown codes.
|
|
275
|
+
|
|
276
|
+
**Parameters:**
|
|
277
|
+
|
|
278
|
+
- `input` (string): Input text containing emojis
|
|
279
|
+
|
|
280
|
+
**Returns:** string
|
|
281
|
+
|
|
282
|
+
**Examples:**
|
|
283
|
+
|
|
284
|
+
```javascript
|
|
285
|
+
import { unemojify } from '@involvex/emoji-cli'
|
|
286
|
+
|
|
287
|
+
unemojify('I โค๏ธ JavaScript!')
|
|
288
|
+
// Output: "I :heart: JavaScript!"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
#### `which(emoji, options)`
|
|
292
|
+
|
|
293
|
+
Get the name/code of an emoji.
|
|
294
|
+
|
|
295
|
+
**Parameters:**
|
|
296
|
+
|
|
297
|
+
- `emoji` (string): The emoji character
|
|
298
|
+
- `options` (object, optional):
|
|
299
|
+
- `markdown` (boolean): Return in markdown format
|
|
300
|
+
|
|
301
|
+
**Returns:** string | undefined
|
|
302
|
+
|
|
303
|
+
**Examples:**
|
|
304
|
+
|
|
305
|
+
```javascript
|
|
306
|
+
import { which } from '@involvex/emoji-cli'
|
|
307
|
+
|
|
308
|
+
which('โค๏ธ')
|
|
309
|
+
// Output: 'heart'
|
|
310
|
+
|
|
311
|
+
which('โค๏ธ', { markdown: true })
|
|
312
|
+
// Output: ':heart:'
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
#### `find(codeOrName)`
|
|
316
|
+
|
|
317
|
+
Find an emoji by code or name, returning both emoji and name.
|
|
318
|
+
|
|
319
|
+
**Parameters:**
|
|
320
|
+
|
|
321
|
+
- `codeOrName` (string): Emoji code or name
|
|
322
|
+
|
|
323
|
+
**Returns:** `{ emoji, name } | undefined`
|
|
324
|
+
|
|
325
|
+
**Examples:**
|
|
326
|
+
|
|
327
|
+
```javascript
|
|
328
|
+
import { find } from '@involvex/emoji-cli'
|
|
329
|
+
|
|
330
|
+
find('heart')
|
|
331
|
+
// Output: { emoji: 'โค๏ธ', name: 'heart' }
|
|
332
|
+
|
|
333
|
+
find('โค๏ธ')
|
|
334
|
+
// Output: { emoji: 'โค๏ธ', name: 'heart' }
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
#### `has(codeOrName)`
|
|
338
|
+
|
|
339
|
+
Check if an emoji exists.
|
|
340
|
+
|
|
341
|
+
**Parameters:**
|
|
342
|
+
|
|
343
|
+
- `codeOrName` (string): Emoji code or name
|
|
344
|
+
|
|
345
|
+
**Returns:** boolean
|
|
346
|
+
|
|
347
|
+
**Examples:**
|
|
348
|
+
|
|
349
|
+
```javascript
|
|
350
|
+
import { has } from '@involvex/emoji-cli'
|
|
351
|
+
|
|
352
|
+
has('heart')
|
|
353
|
+
// Output: true
|
|
354
|
+
|
|
355
|
+
has('non-existent')
|
|
356
|
+
// Output: false
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## ๐ ๏ธ Configuration
|
|
360
|
+
|
|
361
|
+
### Node.js Requirements
|
|
362
|
+
|
|
363
|
+
- **Node.js**: >= 18.0.0
|
|
364
|
+
- **Package Manager**: npm, yarn, pnpm, or bun
|
|
365
|
+
|
|
366
|
+
### TypeScript Support
|
|
367
|
+
|
|
368
|
+
The package includes full TypeScript definitions. No additional types package needed:
|
|
369
|
+
|
|
370
|
+
```typescript
|
|
371
|
+
import { emojify, search, type EmojifyOptions } from '@involvex/emoji-cli'
|
|
372
|
+
|
|
373
|
+
const options: EmojifyOptions = {
|
|
374
|
+
fallback: 'โ',
|
|
375
|
+
format: (emoji, name) => `${emoji} (${name})`,
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
const result = emojify('Hello :world:!', options)
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
## ๐ Troubleshooting
|
|
382
|
+
|
|
383
|
+
### Common Issues
|
|
384
|
+
|
|
385
|
+
**"Cannot find module '@involvex/emoji-cli'"**
|
|
386
|
+
|
|
387
|
+
- Ensure you have Node.js >= 18 installed
|
|
388
|
+
- Try reinstalling: `npm install @involvex/emoji-cli`
|
|
389
|
+
- Check that your package manager is up to date
|
|
390
|
+
|
|
391
|
+
**"Unknown command" in CLI**
|
|
392
|
+
|
|
393
|
+
- For global CLI usage: Ensure you've installed the package globally with your package manager
|
|
394
|
+
- Try without installation: `npx @involvex/emoji-cli --help` or `bunx @involvex/emoji-cli --help`
|
|
395
|
+
- For npm global install: `npm install -g @involvex/emoji-cli`
|
|
396
|
+
- For yarn global install: `yarn global add @involvex/emoji-cli`
|
|
397
|
+
- For pnpm global install: `pnpm add -g @involvex/emoji-cli`
|
|
398
|
+
- For bun global install: `bun add -g @involvex/emoji-cli`
|
|
399
|
+
- Check that the emoji name/code exists using `search()`
|
|
400
|
+
|
|
401
|
+
**"Emoji not found"**
|
|
402
|
+
|
|
403
|
+
- Verify the emoji name using `search()` function
|
|
404
|
+
- Some emojis may not be available in all fonts/platforms
|
|
405
|
+
- Check for typos in emoji names
|
|
406
|
+
|
|
407
|
+
### Getting Help
|
|
408
|
+
|
|
409
|
+
- ๐ **Issues**: [GitHub Issues](https://github.com/omnidan/node-emoji/issues)
|
|
410
|
+
- ๐ฌ **Discussions**: [GitHub Discussions](https://github.com/omnidan/node-emoji/discussions)
|
|
411
|
+
- ๐ **Documentation**: This README and inline code documentation
|
|
412
|
+
|
|
413
|
+
## ๐ค Contributing
|
|
414
|
+
|
|
415
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
416
|
+
|
|
417
|
+
### Development Setup
|
|
418
|
+
|
|
419
|
+
1. **Clone the repository**
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
git clone https://github.com/involvex/node-emoji.git
|
|
423
|
+
cd node-emoji
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
2. **Install dependencies**
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
npm install
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
3. **Run tests**
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
npm test
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
4. **Build the project**
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
npm run build
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
5. **Run linting**
|
|
445
|
+
```bash
|
|
446
|
+
npm run lint
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### Contribution Guidelines
|
|
450
|
+
|
|
451
|
+
- Follow the existing code style and conventions
|
|
452
|
+
- Add tests for new features
|
|
453
|
+
- Update documentation as needed
|
|
454
|
+
- Ensure all tests pass before submitting PRs
|
|
455
|
+
- Use conventional commit messages
|
|
456
|
+
|
|
457
|
+
### Adding New Emojis
|
|
458
|
+
|
|
459
|
+
Emojis are sourced from the [emojilib](https://github.com/muan/emojilib) package. To request new emojis, please contribute to that project.
|
|
460
|
+
|
|
461
|
+
## ๐ License
|
|
462
|
+
|
|
463
|
+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
|
|
464
|
+
|
|
465
|
+
## ๐ Acknowledgments
|
|
466
|
+
|
|
467
|
+
- **Emoji Data**: [emojilib](https://github.com/muan/emojilib) - Comprehensive emoji database
|
|
468
|
+
- **Inspiration**: Built upon the original [node-emoji](https://github.com/omnidan/node-emoji) by Daniel Biedermann
|
|
469
|
+
- **Community**: Thanks to all contributors and users who make this project better
|
|
470
|
+
|
|
471
|
+
## ๐ Package Information
|
|
472
|
+
|
|
473
|
+
### Keywords
|
|
474
|
+
|
|
475
|
+
`emoji`, `simple`, `emoticons`, `emoticon`, `emojis`, `smiley`, `smileys`, `smilies`, `ideogram`, `ideograms`
|
|
476
|
+
|
|
477
|
+
### Engines
|
|
478
|
+
|
|
479
|
+
- **Node.js**: >= 18
|
|
480
|
+
|
|
481
|
+
### Dependencies
|
|
482
|
+
|
|
483
|
+
- **@sindresorhus/is**: Type checking and validation utilities
|
|
484
|
+
- **char-regex**: Character matching utilities
|
|
485
|
+
- **emojilib**: Emoji database and utilities
|
|
486
|
+
- **jiti**: JavaScript Runtime detection
|
|
487
|
+
- **skin-tone**: Skin tone variation support
|
|
488
|
+
|
|
489
|
+
### Dev Dependencies
|
|
490
|
+
|
|
491
|
+
- **TypeScript**: Static type checking
|
|
492
|
+
- **Vitest**: Testing framework
|
|
493
|
+
- **ESLint**: Code linting
|
|
494
|
+
- **Prettier**: Code formatting
|
|
495
|
+
- **tsup**: Build tooling
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
<div align="center">
|
|
500
|
+
|
|
501
|
+
**Made with ๐ by [Involvex](https://github.com/involvex)**
|
|
502
|
+
|
|
503
|
+
[โญ Star this project on GitHub](https://github.com/omnidan/node-emoji) if you find it helpful!
|
|
504
|
+
|
|
505
|
+
</div>
|
|
@@ -177,7 +177,7 @@ var unemojify = (input) => {
|
|
|
177
177
|
// package.json
|
|
178
178
|
var package_default = {
|
|
179
179
|
name: "@involvex/emoji-cli",
|
|
180
|
-
version: "2.2.
|
|
180
|
+
version: "2.2.8",
|
|
181
181
|
description: "Friendly emoji lookups and parsing utilities for Node.js. \u{1F496}",
|
|
182
182
|
keywords: [
|
|
183
183
|
"emoji",
|
|
@@ -192,11 +192,11 @@ var package_default = {
|
|
|
192
192
|
"ideograms"
|
|
193
193
|
],
|
|
194
194
|
bugs: {
|
|
195
|
-
url: "https://github.com/
|
|
195
|
+
url: "https://github.com/involvex/node-emoji/issues"
|
|
196
196
|
},
|
|
197
197
|
repository: {
|
|
198
198
|
type: "git",
|
|
199
|
-
url: "https://github.com/
|
|
199
|
+
url: "https://github.com/involvex/node-emoji"
|
|
200
200
|
},
|
|
201
201
|
license: "MIT",
|
|
202
202
|
author: {
|
|
@@ -360,6 +360,13 @@ var COMMANDS = [
|
|
|
360
360
|
description: "Get a random emoji",
|
|
361
361
|
handler: runRandom,
|
|
362
362
|
requiresArgs: false
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
name: "about",
|
|
366
|
+
aliases: ["--about", "-a"],
|
|
367
|
+
description: "Show information about the CLI",
|
|
368
|
+
handler: showabout,
|
|
369
|
+
requiresArgs: false
|
|
363
370
|
}
|
|
364
371
|
];
|
|
365
372
|
var CLIError = class extends Error {
|
|
@@ -458,6 +465,12 @@ async function runSearch(query) {
|
|
|
458
465
|
);
|
|
459
466
|
}
|
|
460
467
|
}
|
|
468
|
+
async function showabout() {
|
|
469
|
+
console.log(`${CONFIG.name} v${CONFIG.version}`);
|
|
470
|
+
console.log(`${CONFIG.description} \u{1F496}`);
|
|
471
|
+
console.log("author: ", package_default.author.name);
|
|
472
|
+
console.log("Repository: ", package_default.repository.url);
|
|
473
|
+
}
|
|
461
474
|
async function runEmojify(text) {
|
|
462
475
|
if (!text) {
|
|
463
476
|
throw new ValidationError("Text to emojify is required");
|
|
@@ -574,6 +587,10 @@ async function run() {
|
|
|
574
587
|
showVersion();
|
|
575
588
|
return;
|
|
576
589
|
}
|
|
590
|
+
if (commandInput === "--about" || commandInput === "-a") {
|
|
591
|
+
showabout();
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
577
594
|
const command = resolveCommand(commandInput);
|
|
578
595
|
if (!command) {
|
|
579
596
|
throw new CLIError(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../bin/emoji-cli-improved.ts","../../src/emojify.ts","../../src/findByName.ts","../../src/data.ts","../../src/utils.ts","../../src/findByCode.ts","../../src/find.ts","../../src/get.ts","../../src/has.ts","../../src/random.ts","../../src/replace.ts","../../src/search.ts","../../src/unemojify.ts","../../src/which.ts","../../package.json"],"sourcesContent":["#!/usr/bin/env node\n\nimport * as cli from '../src/index'\nimport pkg from '../package.json'\n// Type definitions for better type safety\ninterface CLIConfig {\n name: string\n description: string\n version: string\n}\n\ninterface Command {\n name: string\n aliases: string[]\n description: string\n handler: (args?: string) => void | Promise<void>\n requiresArgs: boolean\n}\n\ninterface ParsedArgs {\n command: string\n args: string[]\n help: boolean\n}\n\n// Configuration\nconst CONFIG: CLIConfig = {\n name: 'emoji-cli',\n description: 'Friendly emoji lookups and parsing utilities for Node.js',\n version: pkg.version as string, // TODO: Get version from package.json dynamically\n}\n\n// Available commands\nconst COMMANDS: Command[] = [\n {\n name: 'search',\n aliases: ['--search'],\n description: 'Search for emojis by name or pattern',\n handler: runSearch,\n requiresArgs: true,\n },\n {\n name: 'emojify',\n aliases: ['--emojify'],\n description: 'Convert text to emojis',\n handler: runEmojify,\n requiresArgs: true,\n },\n {\n name: 'unemojify',\n aliases: ['--unemojify'],\n description: 'Convert emojis back to text',\n handler: runUnemojify,\n requiresArgs: true,\n },\n {\n name: 'get',\n aliases: ['--get'],\n description: 'Get a specific emoji by name',\n handler: runGet,\n requiresArgs: true,\n },\n {\n name: 'has',\n aliases: ['--has'],\n description: 'Check if an emoji exists',\n handler: runHas,\n requiresArgs: true,\n },\n {\n name: 'find',\n aliases: ['--find', '-f'],\n description: 'Find emojis by name',\n handler: runFind,\n requiresArgs: true,\n },\n {\n name: 'random',\n aliases: ['--random', '--rnd', '-r'],\n description: 'Get a random emoji',\n handler: runRandom,\n requiresArgs: false,\n },\n]\n\n// Error handling\nclass CLIError extends Error {\n code: number\n\n constructor(message: string, code: number) {\n super(message)\n this.code = code\n this.name = 'CLIError'\n }\n}\n\nclass ValidationError extends CLIError {\n constructor(message: string) {\n super(message, 2)\n this.name = 'ValidationError'\n }\n}\n\n// Utility functions\nfunction createOutputFormatter() {\n return {\n success: (\n data:\n | never\n | string\n | {\n emoji: string\n name?: string\n key?: string\n }\n | (\n | string\n | {\n emoji: string\n name?: string\n key?: string\n }\n )[],\n ) => {\n if (Array.isArray(data)) {\n if (data.length === 0) {\n console.log('No results found')\n return\n }\n\n data.forEach((item, index) => {\n if (typeof item === 'string') {\n console.log(`${item}`)\n } else if (item && typeof item === 'object') {\n const displayName = item.name || item.key || 'unknown'\n console.log(`${index + 1}. ${item.emoji} ${displayName}`)\n } else {\n console.log(`${index + 1}. ${item}`)\n }\n })\n } else if (data && typeof data === 'object') {\n const displayName = data.name || data.key || 'unknown'\n console.log(`${data.emoji} ${displayName}`)\n } else if (data !== undefined && data !== null) {\n console.log(data)\n } else {\n console.log('No result found')\n }\n },\n error: (message: string) => {\n console.error(`โ Error: ${message}`)\n },\n warning: (message: string) => {\n console.warn(`โ ๏ธ Warning: ${message}`)\n },\n info: (message: string) => {\n console.log(`โน๏ธ ${message}`)\n },\n }\n}\n\nconst output = createOutputFormatter()\n\n// Argument parsing\nfunction parseArgs(args: string[]): ParsedArgs {\n if (args.length === 0) {\n return { command: '', args: [], help: true }\n }\n\n const [first, ...rest] = args\n\n // Check for help flags\n if (first === '--help' || first === '-h') {\n return { command: '', args: [], help: true }\n }\n\n return {\n command: first,\n args: rest,\n help: false,\n }\n}\n\n// Command resolution\nfunction resolveCommand(input: string): Command | null {\n if (!input) {\n return null\n }\n\n return (\n COMMANDS.find(cmd => cmd.name === input || cmd.aliases.includes(input)) ||\n null\n )\n}\n\n// Validation\nfunction validateArgs(command: Command, args: string[]): void {\n if (command.requiresArgs && args.length === 0) {\n throw new ValidationError(`Command \"${command.name}\" requires arguments`)\n }\n\n if (!command.requiresArgs && args.length > 0) {\n throw new ValidationError(\n `Command \"${command.name}\" does not accept arguments`,\n )\n }\n}\n\n// Command handlers\nasync function runSearch(query?: string): Promise<void> {\n if (!query) {\n throw new ValidationError('Search query is required')\n }\n\n try {\n const results = cli.search(query)\n output.success(results)\n } catch (error) {\n output.error(\n `Failed to search for \"${query}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runEmojify(text?: string): Promise<void> {\n if (!text) {\n throw new ValidationError('Text to emojify is required')\n }\n\n try {\n const result = cli.emojify(text)\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to emojify text: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runUnemojify(text?: string): Promise<void> {\n if (!text) {\n throw new ValidationError('Text to unemojify is required')\n }\n\n try {\n const result = cli.unemojify(text)\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to unemojify text: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runGet(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Emoji name is required')\n }\n\n try {\n const result = cli.get(name)\n if (result) {\n output.success(result)\n } else {\n output.warning(`Emoji \"${name}\" not found`)\n }\n } catch (error) {\n output.error(\n `Failed to get emoji \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runHas(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Emoji name is required')\n }\n\n try {\n const result = cli.has(name)\n output.success(\n result ? `โ
Emoji \"${name}\" exists` : `โ Emoji \"${name}\" not found`,\n )\n } catch (error) {\n output.error(\n `Failed to check emoji \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runFind(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Search term is required')\n }\n\n try {\n const result = cli.find(name)\n if (result) {\n output.success(result)\n } else {\n output.warning(`No emojis found for \"${name}\"`)\n }\n } catch (error) {\n output.error(\n `Failed to find emojis for \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runRandom(): Promise<void> {\n try {\n const result = cli.random()\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to get random emoji: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\n// Help and usage information\nfunction showHelp(): void {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n console.log(`${CONFIG.description} ๐`)\n console.log('\\nUsage:')\n console.log(` ${CONFIG.name} <command> [arguments]`)\n console.log('\\nCommands:')\n\n COMMANDS.forEach(cmd => {\n const aliasesText =\n cmd.aliases.length > 1 ? ` (${cmd.aliases.join(', ')})` : ''\n console.log(` ${cmd.name}${aliasesText} ${cmd.description}`)\n })\n\n console.log('\\nExamples:')\n console.log(` ${CONFIG.name} --search \"heart\"`)\n console.log(` ${CONFIG.name} --get \"heart\"`)\n console.log(` ${CONFIG.name} --emojify \"I love you\"`)\n console.log(` ${CONFIG.name} --random`)\n}\n\nfunction showVersion(): void {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n}\n\n// Main execution\nasync function run(): Promise<void> {\n try {\n const args = process.argv.slice(2)\n const { command: commandInput, args: commandArgs, help } = parseArgs(args)\n\n // Handle global flags\n if (help || !commandInput) {\n showHelp()\n return\n }\n\n if (commandInput === '--version' || commandInput === '-v') {\n showVersion()\n return\n }\n\n // Resolve and execute command\n const command = resolveCommand(commandInput)\n if (!command) {\n throw new CLIError(\n `Unknown command: ${commandInput}. Use --help for available commands.`,\n 1,\n )\n }\n\n // Validate arguments\n validateArgs(command, commandArgs)\n\n // Execute command\n await command.handler(commandArgs[0])\n } catch (error) {\n if (error instanceof CLIError) {\n output.error(error.message)\n process.exit(error.code)\n } else if (error instanceof ValidationError) {\n output.error(error.message)\n output.info('Use --help for usage information')\n process.exit(error.code)\n } else {\n output.error(\n `Unexpected error: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n process.exit(1)\n }\n }\n}\n\n// Execute if this file is run directly\n// if (import.meta.url === `file://${process.argv[1]}`) {\n// run().catch(error => {\n// output.error(\n// `Failed to run CLI: ${\n// error instanceof Error ? error.message : 'Unknown error'\n// }`,\n// )\n// process.exit(1)\n// })\n// }\nrun()\nexport default run\n","import is from '@sindresorhus/is'\n\nimport { findByName } from './findByName.js'\nimport { asFunction, normalizeName } from './utils.js'\n\nexport type EmojifyFormat = (\n name: string,\n part?: string,\n input?: string,\n) => string\n\nexport interface EmojifyOptions {\n /**\n * The string to fallback to if an emoji was not found.\n */\n fallback?: ((part: string) => string) | string\n\n /**\n * Adds a middleware layer to modify each matched emoji after parsing.\n */\n format?: EmojifyFormat\n}\n\n/**\n * Parse all markdown-encoded emojis in a string.\n */\nexport const emojify = (\n input: string,\n { fallback, format = name => name }: EmojifyOptions = {},\n) => {\n const fallbackFunction =\n fallback === undefined ? fallback : asFunction(fallback)\n\n is.string(input)\n is.any([is.undefined, is.function_], fallbackFunction)\n is.function_(format)\n\n return input.replace(/:[\\w\\-+]+:/g, part => {\n const found = findByName(part)\n if (found) {\n return format(found.emoji, part, input)\n }\n\n if (fallbackFunction) {\n return format(fallbackFunction(normalizeName(part)))\n }\n\n return format(part)\n })\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { emojiCodesByName } from './data.js'\nimport { normalizeName } from './utils.js'\n\nexport const findByName = (name: string) => {\n assert.string(name)\n\n const nameNormalized = normalizeName(name)\n const emoji = emojiCodesByName.get(nameNormalized)\n\n return emoji ? { emoji, key: nameNormalized } : undefined\n}\n","import emojilib from 'emojilib'\n\nimport { normalizeCode } from './utils.js'\n\nexport interface Emoji {\n emoji: string\n key: string\n}\n\nexport const emojiData = Object.entries(emojilib.lib).map(\n ([name, { char: emoji }]) => [name, emoji] as const,\n)\n\nexport const emojiCodesByName = new Map(emojiData)\n\nexport const emojiNamesByCode = new Map(\n emojiData.map(([name, emoji]) => [normalizeCode(emoji), name]),\n)\n","import charRegex from 'char-regex'\n\nexport const charRegexMatcher = charRegex()\n\nexport function asFunction<T extends PropertyKey, Args extends unknown[]>(\n input: ((...args: Args) => T) | T,\n): (...args: Args) => T {\n return typeof input === 'function' ? input : () => input\n}\n\n/**\n * Non spacing mark contained by some emoticons (65039 - '๏ธ' - 0xFE0F).\n *\n * It's the 'Variant Form', which provides more information so that emoticons\n * can be rendered as more colorful graphics. FE0E is a unicode text version\n * whereas FE0F should be rendered as a graphical version.\n * The code gracefully degrades.\n */\nconst NON_SPACING_MARK = String.fromCharCode(65039)\n\nconst nonSpacingRegex = new RegExp(NON_SPACING_MARK, 'g')\n\n/**\n * Removes the non-spacing-mark from the emoji code.\n *\n * Never send a stripped version to clients, as it kills graphical emoticons.\n */\nexport function normalizeCode(code: string) {\n return code.replace(nonSpacingRegex, '')\n}\n\nexport function normalizeName(name: string) {\n return /:.+:/.test(name) ? name.slice(1, -1) : name\n}\n\nexport function randomItem<T>(array: T[]) {\n return array[Math.floor(Math.random() * array.length)]\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { emojiNamesByCode } from './data.js'\nimport { normalizeCode } from './utils.js'\n\nexport const findByCode = (code: string) => {\n assert.string(code)\n\n const emojiNormalized = normalizeCode(code)\n const key = emojiNamesByCode.get(emojiNormalized)\n\n return key ? { emoji: emojiNormalized, key } : undefined\n}\n","import { findByCode } from './findByCode.js'\nimport { findByName } from './findByName.js'\n\n/**\n * Get the name and character of an emoji.\n */\nexport const find = (codeOrName: string) => {\n return findByCode(codeOrName) ?? findByName(codeOrName)\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { emojiCodesByName } from './data.js'\nimport { normalizeName } from './utils.js'\n\n/**\n * Get an emoji from an emoji name.\n */\nexport const get = (codeOrName: string) => {\n assert.string(codeOrName)\n\n return emojiCodesByName.get(normalizeName(codeOrName))\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { emojiCodesByName, emojiNamesByCode } from './data.js'\nimport { normalizeCode, normalizeName } from './utils.js'\n\n/**\n * Check if this library supports a specific emoji.\n */\nexport const has = (codeOrName: string) => {\n assert.string(codeOrName)\n\n return (\n emojiCodesByName.has(normalizeName(codeOrName)) ||\n emojiNamesByCode.has(normalizeCode(codeOrName))\n )\n}\n","import { emojiData } from './data.js'\nimport { randomItem } from './utils.js'\n\n/**\n * Get a random emoji.\n */\nexport const random = () => {\n const [name, emoji] = randomItem(emojiData)\n return { emoji, name }\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { Emoji } from './data.js'\nimport { findByCode } from './findByCode.js'\nimport { asFunction, charRegexMatcher } from './utils.js'\n\nexport type ReplaceReplacement = (\n emoji: Emoji,\n index: number,\n string: string,\n) => string\n\n/**\n * Replace the emojis in a string.\n */\nexport const replace = (\n input: string,\n replacement: ReplaceReplacement | string,\n { preserveSpaces = false } = {},\n) => {\n const replace = asFunction(replacement)\n\n assert.string(input)\n assert.function_(replace)\n assert.boolean(preserveSpaces)\n\n const characters = input.match(charRegexMatcher)\n if (characters === null) {\n return input\n }\n\n return characters\n .map((character, index) => {\n const found = findByCode(character)\n if (!found) {\n return character\n }\n\n if (!preserveSpaces && characters[index + 1] === ' ') {\n characters[index + 1] = ''\n }\n\n return replace(found, index, input)\n })\n .join('')\n}\n","import is, { assert } from '@sindresorhus/is'\n\nimport { emojiData } from './data.js'\nimport { normalizeName } from './utils.js'\n\n/**\n * Search for emojis containing the provided name or pattern in their name.\n */\nexport const search = (keyword: RegExp | string) => {\n assert.any([is.string, is.regExp], keyword)\n\n if (is.string(keyword)) {\n keyword = normalizeName(keyword)\n }\n\n if (is.regExp(keyword)) {\n const normalizedPattern = normalizeName(keyword.toString())\n keyword = new RegExp(normalizedPattern)\n }\n\n return emojiData\n .filter(([name]) => name.match(keyword))\n .map(([name, emoji]) => ({ emoji, name }))\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { charRegexMatcher } from './utils.js'\nimport { which } from './which.js'\n\n/**\n * Convert all emojis in a string to their markdown-encoded counterparts.\n */\nexport const unemojify = (input: string) => {\n assert.string(input)\n\n const characters = input.match(charRegexMatcher)\n if (characters === null) {\n return input\n }\n\n return characters\n .map(character => which(character, { markdown: true }) ?? character)\n .join('')\n}\n","import { assert } from '@sindresorhus/is'\nimport skinTone from 'skin-tone'\n\nimport { findByCode } from './findByCode.js'\n\nexport interface WhichOptions {\n markdown?: boolean\n}\n\n/**\n * Get an emoji name from an emoji.\n */\nexport const which = (\n emoji: string,\n { markdown = false }: WhichOptions = {},\n) => {\n assert.string(emoji)\n assert.boolean(markdown)\n\n const result = findByCode(skinTone(emoji, 'none'))\n if (result === undefined) {\n return undefined\n }\n\n return markdown ? `:${result.key}:` : result.key\n}\n","{\n \"name\": \"@involvex/emoji-cli\",\n \"version\": \"2.2.7\",\n \"description\": \"Friendly emoji lookups and parsing utilities for Node.js. ๐\",\n \"keywords\": [\n \"emoji\",\n \"simple\",\n \"emoticons\",\n \"emoticon\",\n \"emojis\",\n \"smiley\",\n \"smileys\",\n \"smilies\",\n \"ideogram\",\n \"ideograms\"\n ],\n \"bugs\": {\n \"url\": \"https://github.com/omnidan/node-emoji/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/omnidan/node-emoji\"\n },\n \"license\": \"MIT\",\n \"author\": {\n \"name\": \"Involvex\"\n },\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"types\": {\n \"import\": \"./lib/index.d.ts\",\n \"require\": \"./lib/index.d.cts\"\n },\n \"import\": \"./lib/index.js\",\n \"require\": \"./lib/index.cjs\"\n }\n },\n \"main\": \"./lib/index.js\",\n \"bin\": {\n \"emoji-cli\": \"lib/bin/emoji-cli-improved.js\"\n },\n \"files\": [\n \"lib/\",\n \"package.json\",\n \"LICENSE.md\",\n \"README.md\",\n \"bin/emoji-cli.ts\",\n \"src/*\"\n ],\n \"scripts\": {\n \"prebuild\": \"npm run format && npm run lint && npm run typecheck\",\n \"build\": \"tsup\",\n \"build:cli\": \"bun build --target=node bin/emoji-cli-improved.ts --outdir=dist\",\n \"dev\": \"bun run bin/emoji-cli-improved.ts\",\n \"format\": \"prettier . --write\",\n \"lint\": \"eslint . --ignore-pattern lib --ignore-pattern dist -c eslint.config.ts\",\n \"lint:knip\": \"knip\",\n \"lint:md\": \"markdownlint \\\"**/*.md\\\" \\\".github/**/*.md\\\" --rules sentences-per-line\",\n \"lint:package-json\": \"npmPkgJsonLint .\",\n \"lint:packages\": \"pnpm dedupe --check\",\n \"lint:spelling\": \"cspell \\\"**\\\" \\\".github/**/*\\\"\",\n \"prepare\": \"husky install\",\n \"should-semantic-release\": \"should-semantic-release --verbose\",\n \"start\": \"node lib/bin/emoji-cli-improved.js\",\n \"test\": \"vitest\",\n \"test:cjs\": \"node ./src/e2e.cjs\",\n \"tsc\": \"tsc\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"lint-staged\": {\n \"*\": \"prettier --ignore-unknown --write\"\n },\n \"dependencies\": {\n \"@sindresorhus/is\": \"^4.6.0\",\n \"char-regex\": \"^1.0.2\",\n \"emojilib\": \"^2.4.0\",\n \"jiti\": \"^2.6.1\",\n \"skin-tone\": \"^2.0.0\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.2\",\n \"@eslint/json\": \"^0.14.0\",\n \"@release-it/conventional-changelog\": \"^10.0.0\",\n \"@swc/core\": \"^1.3.58\",\n \"@types/eslint\": \"^8.44.7\",\n \"@typescript-eslint/eslint-plugin\": \"^8.0.0\",\n \"@typescript-eslint/parser\": \"^8.0.0\",\n \"@vitest/coverage-v8\": \"^0.34.6\",\n \"console-fail-test\": \"^0.5.0\",\n \"cspell\": \"^8.0.0\",\n \"eslint\": \"^9.39.2\",\n \"eslint-plugin-deprecation\": \"^3.0.0\",\n \"eslint-plugin-eslint-comments\": \"^3.2.0\",\n \"eslint-plugin-jsdoc\": \"^50.0.0\",\n \"eslint-plugin-jsonc\": \"^2.10.0\",\n \"eslint-plugin-markdown\": \"^3.0.1\",\n \"eslint-plugin-n\": \"^17.0.0\",\n \"eslint-plugin-no-only-tests\": \"^3.1.0\",\n \"eslint-plugin-perfectionist\": \"^2.3.0\",\n \"eslint-plugin-regexp\": \"^2.1.1\",\n \"eslint-plugin-vitest\": \"^0.3.9\",\n \"eslint-plugin-yml\": \"^1.10.0\",\n \"globals\": \"^16.5.0\",\n \"husky\": \"^8.0.3\",\n \"jsonc-eslint-parser\": \"^2.4.0\",\n \"knip\": \"^4.0.0\",\n \"lint-staged\": \"^15.1.0\",\n \"markdownlint\": \"^0.37.0\",\n \"markdownlint-cli\": \"^0.44.0\",\n \"npm-package-json-lint\": \"^8.0.0\",\n \"npm-package-json-lint-config-default\": \"^7.0.0\",\n \"prettier\": \"^3.0.3\",\n \"prettier-plugin-curly\": \"^0.3.0\",\n \"prettier-plugin-packagejson\": \"^2.4.6\",\n \"release-it\": \"^18.0.0\",\n \"sentences-per-line\": \"^0.3.0\",\n \"should-semantic-release\": \"^0.2.1\",\n \"tsup\": \"^8.0.0\",\n \"typescript\": \"^5.2.2\",\n \"typescript-eslint\": \"^8.50.1\",\n \"vitest\": \"^0.34.6\",\n \"yaml-eslint-parser\": \"^1.2.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,aAAe;;;ACAf,gBAAuB;;;ACAvB,sBAAqB;;;ACArB,wBAAsB;AAEf,IAAM,uBAAmB,kBAAAC,SAAU;AAEnC,SAAS,WACd,OACsB;AACtB,SAAO,OAAO,UAAU,aAAa,QAAQ,MAAM;AACrD;AAUA,IAAM,mBAAmB,OAAO,aAAa,KAAK;AAElD,IAAM,kBAAkB,IAAI,OAAO,kBAAkB,GAAG;AAOjD,SAAS,cAAc,MAAc;AAC1C,SAAO,KAAK,QAAQ,iBAAiB,EAAE;AACzC;AAEO,SAAS,cAAc,MAAc;AAC1C,SAAO,OAAO,KAAK,IAAI,IAAI,KAAK,MAAM,GAAG,EAAE,IAAI;AACjD;AAEO,SAAS,WAAc,OAAY;AACxC,SAAO,MAAM,KAAK,MAAM,KAAK,OAAO,IAAI,MAAM,MAAM,CAAC;AACvD;;;AD5BO,IAAM,YAAY,OAAO,QAAQ,gBAAAC,QAAS,GAAG,EAAE;AAAA,EACpD,CAAC,CAAC,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK;AAC3C;AAEO,IAAM,mBAAmB,IAAI,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AY;AACZ;AAAA,IACF;AAGA,UAAM,UAAU,eAAe,YAAY;AAC3C,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI;AAAA,QACR,oBAAoB,YAAY;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAGA,iBAAa,SAAS,WAAW;AAGjC,UAAM,QAAQ,QAAQ,YAAY,CAAC,CAAC;AAAA,EACtC,SAAS,OAAO;AACd,QAAI,iBAAiB,UAAU;AAC7B,aAAO,MAAM,MAAM,OAAO;AAC1B,cAAQ,KAAK,MAAM,IAAI;AAAA,IACzB,WAAW,iBAAiB,iBAAiB;AAC3C,aAAO,MAAM,MAAM,OAAO;AAC1B,aAAO,KAAK,kCAAkC;AAC9C,cAAQ,KAAK,MAAM,IAAI;AAAA,IACzB,OAAO;AACL,aAAO;AAAA,QACL,qBACE,iBAAiB,QAAQ,MAAM,UAAU,eAC3C;AAAA,MACF;AACA,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF;AACF;AAaA,IAAI;AACJ,IAAO,6BAAQ;","names":["import_is","charRegex","emojilib","is","import_is","import_is","import_is","import_is","import_is","is","import_is","import_is","skinTone"]}
|
|
1
|
+
{"version":3,"sources":["../../bin/emoji-cli-improved.ts","../../src/emojify.ts","../../src/findByName.ts","../../src/data.ts","../../src/utils.ts","../../src/findByCode.ts","../../src/find.ts","../../src/get.ts","../../src/has.ts","../../src/random.ts","../../src/replace.ts","../../src/search.ts","../../src/unemojify.ts","../../src/which.ts","../../package.json"],"sourcesContent":["#!/usr/bin/env node\n\nimport * as cli from '../src/index'\nimport pkg from '../package.json'\n// Type definitions for better type safety\ninterface CLIConfig {\n name: string\n description: string\n version: string\n}\n\ninterface Command {\n name: string\n aliases: string[]\n description: string\n handler: (args?: string) => void | Promise<void>\n requiresArgs: boolean\n}\n\ninterface ParsedArgs {\n command: string\n args: string[]\n help: boolean\n}\n\n// Configuration\nconst CONFIG: CLIConfig = {\n name: 'emoji-cli',\n description: 'Friendly emoji lookups and parsing utilities for Node.js',\n version: pkg.version as string, // TODO: Get version from package.json dynamically\n}\n\n// Available commands\nconst COMMANDS: Command[] = [\n {\n name: 'search',\n aliases: ['--search'],\n description: 'Search for emojis by name or pattern',\n handler: runSearch,\n requiresArgs: true,\n },\n {\n name: 'emojify',\n aliases: ['--emojify'],\n description: 'Convert text to emojis',\n handler: runEmojify,\n requiresArgs: true,\n },\n {\n name: 'unemojify',\n aliases: ['--unemojify'],\n description: 'Convert emojis back to text',\n handler: runUnemojify,\n requiresArgs: true,\n },\n {\n name: 'get',\n aliases: ['--get'],\n description: 'Get a specific emoji by name',\n handler: runGet,\n requiresArgs: true,\n },\n {\n name: 'has',\n aliases: ['--has'],\n description: 'Check if an emoji exists',\n handler: runHas,\n requiresArgs: true,\n },\n {\n name: 'find',\n aliases: ['--find', '-f'],\n description: 'Find emojis by name',\n handler: runFind,\n requiresArgs: true,\n },\n {\n name: 'random',\n aliases: ['--random', '--rnd', '-r'],\n description: 'Get a random emoji',\n handler: runRandom,\n requiresArgs: false,\n },\n {\n name: 'about',\n aliases: ['--about', '-a'],\n description: 'Show information about the CLI',\n handler: showabout,\n requiresArgs: false,\n },\n]\n\n// Error handling\nclass CLIError extends Error {\n code: number\n\n constructor(message: string, code: number) {\n super(message)\n this.code = code\n this.name = 'CLIError'\n }\n}\n\nclass ValidationError extends CLIError {\n constructor(message: string) {\n super(message, 2)\n this.name = 'ValidationError'\n }\n}\n\n// Utility functions\nfunction createOutputFormatter() {\n return {\n success: (\n data:\n | never\n | string\n | {\n emoji: string\n name?: string\n key?: string\n }\n | (\n | string\n | {\n emoji: string\n name?: string\n key?: string\n }\n )[],\n ) => {\n if (Array.isArray(data)) {\n if (data.length === 0) {\n console.log('No results found')\n return\n }\n\n data.forEach((item, index) => {\n if (typeof item === 'string') {\n console.log(`${item}`)\n } else if (item && typeof item === 'object') {\n const displayName = item.name || item.key || 'unknown'\n console.log(`${index + 1}. ${item.emoji} ${displayName}`)\n } else {\n console.log(`${index + 1}. ${item}`)\n }\n })\n } else if (data && typeof data === 'object') {\n const displayName = data.name || data.key || 'unknown'\n console.log(`${data.emoji} ${displayName}`)\n } else if (data !== undefined && data !== null) {\n console.log(data)\n } else {\n console.log('No result found')\n }\n },\n error: (message: string) => {\n console.error(`โ Error: ${message}`)\n },\n warning: (message: string) => {\n console.warn(`โ ๏ธ Warning: ${message}`)\n },\n info: (message: string) => {\n console.log(`โน๏ธ ${message}`)\n },\n }\n}\n\nconst output = createOutputFormatter()\n\n// Argument parsing\nfunction parseArgs(args: string[]): ParsedArgs {\n if (args.length === 0) {\n return { command: '', args: [], help: true }\n }\n\n const [first, ...rest] = args\n\n // Check for help flags\n if (first === '--help' || first === '-h') {\n return { command: '', args: [], help: true }\n }\n\n return {\n command: first,\n args: rest,\n help: false,\n }\n}\n\n// Command resolution\nfunction resolveCommand(input: string): Command | null {\n if (!input) {\n return null\n }\n\n return (\n COMMANDS.find(cmd => cmd.name === input || cmd.aliases.includes(input)) ||\n null\n )\n}\n\n// Validation\nfunction validateArgs(command: Command, args: string[]): void {\n if (command.requiresArgs && args.length === 0) {\n throw new ValidationError(`Command \"${command.name}\" requires arguments`)\n }\n\n if (!command.requiresArgs && args.length > 0) {\n throw new ValidationError(\n `Command \"${command.name}\" does not accept arguments`,\n )\n }\n}\n\n// Command handlers\nasync function runSearch(query?: string): Promise<void> {\n if (!query) {\n throw new ValidationError('Search query is required')\n }\n\n try {\n const results = cli.search(query)\n output.success(results)\n } catch (error) {\n output.error(\n `Failed to search for \"${query}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\nasync function showabout() {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n console.log(`${CONFIG.description} ๐`)\n console.log('author: ', pkg.author.name)\n console.log('Repository: ', pkg.repository.url)\n}\n\nasync function runEmojify(text?: string): Promise<void> {\n if (!text) {\n throw new ValidationError('Text to emojify is required')\n }\n\n try {\n const result = cli.emojify(text)\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to emojify text: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runUnemojify(text?: string): Promise<void> {\n if (!text) {\n throw new ValidationError('Text to unemojify is required')\n }\n\n try {\n const result = cli.unemojify(text)\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to unemojify text: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runGet(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Emoji name is required')\n }\n\n try {\n const result = cli.get(name)\n if (result) {\n output.success(result)\n } else {\n output.warning(`Emoji \"${name}\" not found`)\n }\n } catch (error) {\n output.error(\n `Failed to get emoji \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runHas(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Emoji name is required')\n }\n\n try {\n const result = cli.has(name)\n output.success(\n result ? `โ
Emoji \"${name}\" exists` : `โ Emoji \"${name}\" not found`,\n )\n } catch (error) {\n output.error(\n `Failed to check emoji \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runFind(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Search term is required')\n }\n\n try {\n const result = cli.find(name)\n if (result) {\n output.success(result)\n } else {\n output.warning(`No emojis found for \"${name}\"`)\n }\n } catch (error) {\n output.error(\n `Failed to find emojis for \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runRandom(): Promise<void> {\n try {\n const result = cli.random()\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to get random emoji: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\n// Help and usage information\nfunction showHelp(): void {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n console.log(`${CONFIG.description} ๐`)\n console.log('\\nUsage:')\n console.log(` ${CONFIG.name} <command> [arguments]`)\n console.log('\\nCommands:')\n\n COMMANDS.forEach(cmd => {\n const aliasesText =\n cmd.aliases.length > 1 ? ` (${cmd.aliases.join(', ')})` : ''\n console.log(` ${cmd.name}${aliasesText} ${cmd.description}`)\n })\n\n console.log('\\nExamples:')\n console.log(` ${CONFIG.name} --search \"heart\"`)\n console.log(` ${CONFIG.name} --get \"heart\"`)\n console.log(` ${CONFIG.name} --emojify \"I love you\"`)\n console.log(` ${CONFIG.name} --random`)\n}\n\nfunction showVersion(): void {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n}\n\n// Main execution\nasync function run(): Promise<void> {\n try {\n const args = process.argv.slice(2)\n const { command: commandInput, args: commandArgs, help } = parseArgs(args)\n\n // Handle global flags\n if (help || !commandInput) {\n showHelp()\n return\n }\n\n if (commandInput === '--version' || commandInput === '-v') {\n showVersion()\n return\n }\n if (commandInput === '--about' || commandInput === '-a') {\n showabout()\n return\n }\n // Resolve and execute command\n const command = resolveCommand(commandInput)\n if (!command) {\n throw new CLIError(\n `Unknown command: ${commandInput}. Use --help for available commands.`,\n 1,\n )\n }\n\n // Validate arguments\n validateArgs(command, commandArgs)\n\n // Execute command\n await command.handler(commandArgs[0])\n } catch (error) {\n if (error instanceof CLIError) {\n output.error(error.message)\n process.exit(error.code)\n } else if (error instanceof ValidationError) {\n output.error(error.message)\n output.info('Use --help for usage information')\n process.exit(error.code)\n } else {\n output.error(\n `Unexpected error: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n process.exit(1)\n }\n }\n}\n\n// Execute if this file is run directly\n// if (import.meta.url === `file://${process.argv[1]}`) {\n// run().catch(error => {\n// output.error(\n// `Failed to run CLI: ${\n// error instanceof Error ? error.message : 'Unknown error'\n// }`,\n// )\n// process.exit(1)\n// })\n// }\nrun()\nexport default run\n","import is from '@sindresorhus/is'\n\nimport { findByName } from './findByName.js'\nimport { asFunction, normalizeName } from './utils.js'\n\nexport type EmojifyFormat = (\n name: string,\n part?: string,\n input?: string,\n) => string\n\nexport interface EmojifyOptions {\n /**\n * The string to fallback to if an emoji was not found.\n */\n fallback?: ((part: string) => string) | string\n\n /**\n * Adds a middleware layer to modify each matched emoji after parsing.\n */\n format?: EmojifyFormat\n}\n\n/**\n * Parse all markdown-encoded emojis in a string.\n */\nexport const emojify = (\n input: string,\n { fallback, format = name => name }: EmojifyOptions = {},\n) => {\n const fallbackFunction =\n fallback === undefined ? fallback : asFunction(fallback)\n\n is.string(input)\n is.any([is.undefined, is.function_], fallbackFunction)\n is.function_(format)\n\n return input.replace(/:[\\w\\-+]+:/g, part => {\n const found = findByName(part)\n if (found) {\n return format(found.emoji, part, input)\n }\n\n if (fallbackFunction) {\n return format(fallbackFunction(normalizeName(part)))\n }\n\n return format(part)\n })\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { emojiCodesByName } from './data.js'\nimport { normalizeName } from './utils.js'\n\nexport const findByName = (name: string) => {\n assert.string(name)\n\n const nameNormalized = normalizeName(name)\n const emoji = emojiCodesByName.get(nameNormalized)\n\n return emoji ? { emoji, key: nameNormalized } : undefined\n}\n","import emojilib from 'emojilib'\n\nimport { normalizeCode } from './utils.js'\n\nexport interface Emoji {\n emoji: string\n key: string\n}\n\nexport const emojiData = Object.entries(emojilib.lib).map(\n ([name, { char: emoji }]) => [name, emoji] as const,\n)\n\nexport const emojiCodesByName = new Map(emojiData)\n\nexport const emojiNamesByCode = new Map(\n emojiData.map(([name, emoji]) => [normalizeCode(emoji), name]),\n)\n","import charRegex from 'char-regex'\n\nexport const charRegexMatcher = charRegex()\n\nexport function asFunction<T extends PropertyKey, Args extends unknown[]>(\n input: ((...args: Args) => T) | T,\n): (...args: Args) => T {\n return typeof input === 'function' ? input : () => input\n}\n\n/**\n * Non spacing mark contained by some emoticons (65039 - '๏ธ' - 0xFE0F).\n *\n * It's the 'Variant Form', which provides more information so that emoticons\n * can be rendered as more colorful graphics. FE0E is a unicode text version\n * whereas FE0F should be rendered as a graphical version.\n * The code gracefully degrades.\n */\nconst NON_SPACING_MARK = String.fromCharCode(65039)\n\nconst nonSpacingRegex = new RegExp(NON_SPACING_MARK, 'g')\n\n/**\n * Removes the non-spacing-mark from the emoji code.\n *\n * Never send a stripped version to clients, as it kills graphical emoticons.\n */\nexport function normalizeCode(code: string) {\n return code.replace(nonSpacingRegex, '')\n}\n\nexport function normalizeName(name: string) {\n return /:.+:/.test(name) ? name.slice(1, -1) : name\n}\n\nexport function randomItem<T>(array: T[]) {\n return array[Math.floor(Math.random() * array.length)]\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { emojiNamesByCode } from './data.js'\nimport { normalizeCode } from './utils.js'\n\nexport const findByCode = (code: string) => {\n assert.string(code)\n\n const emojiNormalized = normalizeCode(code)\n const key = emojiNamesByCode.get(emojiNormalized)\n\n return key ? { emoji: emojiNormalized, key } : undefined\n}\n","import { findByCode } from './findByCode.js'\nimport { findByName } from './findByName.js'\n\n/**\n * Get the name and character of an emoji.\n */\nexport const find = (codeOrName: string) => {\n return findByCode(codeOrName) ?? findByName(codeOrName)\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { emojiCodesByName } from './data.js'\nimport { normalizeName } from './utils.js'\n\n/**\n * Get an emoji from an emoji name.\n */\nexport const get = (codeOrName: string) => {\n assert.string(codeOrName)\n\n return emojiCodesByName.get(normalizeName(codeOrName))\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { emojiCodesByName, emojiNamesByCode } from './data.js'\nimport { normalizeCode, normalizeName } from './utils.js'\n\n/**\n * Check if this library supports a specific emoji.\n */\nexport const has = (codeOrName: string) => {\n assert.string(codeOrName)\n\n return (\n emojiCodesByName.has(normalizeName(codeOrName)) ||\n emojiNamesByCode.has(normalizeCode(codeOrName))\n )\n}\n","import { emojiData } from './data.js'\nimport { randomItem } from './utils.js'\n\n/**\n * Get a random emoji.\n */\nexport const random = () => {\n const [name, emoji] = randomItem(emojiData)\n return { emoji, name }\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { Emoji } from './data.js'\nimport { findByCode } from './findByCode.js'\nimport { asFunction, charRegexMatcher } from './utils.js'\n\nexport type ReplaceReplacement = (\n emoji: Emoji,\n index: number,\n string: string,\n) => string\n\n/**\n * Replace the emojis in a string.\n */\nexport const replace = (\n input: string,\n replacement: ReplaceReplacement | string,\n { preserveSpaces = false } = {},\n) => {\n const replace = asFunction(replacement)\n\n assert.string(input)\n assert.function_(replace)\n assert.boolean(preserveSpaces)\n\n const characters = input.match(charRegexMatcher)\n if (characters === null) {\n return input\n }\n\n return characters\n .map((character, index) => {\n const found = findByCode(character)\n if (!found) {\n return character\n }\n\n if (!preserveSpaces && characters[index + 1] === ' ') {\n characters[index + 1] = ''\n }\n\n return replace(found, index, input)\n })\n .join('')\n}\n","import is, { assert } from '@sindresorhus/is'\n\nimport { emojiData } from './data.js'\nimport { normalizeName } from './utils.js'\n\n/**\n * Search for emojis containing the provided name or pattern in their name.\n */\nexport const search = (keyword: RegExp | string) => {\n assert.any([is.string, is.regExp], keyword)\n\n if (is.string(keyword)) {\n keyword = normalizeName(keyword)\n }\n\n if (is.regExp(keyword)) {\n const normalizedPattern = normalizeName(keyword.toString())\n keyword = new RegExp(normalizedPattern)\n }\n\n return emojiData\n .filter(([name]) => name.match(keyword))\n .map(([name, emoji]) => ({ emoji, name }))\n}\n","import { assert } from '@sindresorhus/is'\n\nimport { charRegexMatcher } from './utils.js'\nimport { which } from './which.js'\n\n/**\n * Convert all emojis in a string to their markdown-encoded counterparts.\n */\nexport const unemojify = (input: string) => {\n assert.string(input)\n\n const characters = input.match(charRegexMatcher)\n if (characters === null) {\n return input\n }\n\n return characters\n .map(character => which(character, { markdown: true }) ?? character)\n .join('')\n}\n","import { assert } from '@sindresorhus/is'\nimport skinTone from 'skin-tone'\n\nimport { findByCode } from './findByCode.js'\n\nexport interface WhichOptions {\n markdown?: boolean\n}\n\n/**\n * Get an emoji name from an emoji.\n */\nexport const which = (\n emoji: string,\n { markdown = false }: WhichOptions = {},\n) => {\n assert.string(emoji)\n assert.boolean(markdown)\n\n const result = findByCode(skinTone(emoji, 'none'))\n if (result === undefined) {\n return undefined\n }\n\n return markdown ? `:${result.key}:` : result.key\n}\n","{\n \"name\": \"@involvex/emoji-cli\",\n \"version\": \"2.2.8\",\n \"description\": \"Friendly emoji lookups and parsing utilities for Node.js. ๐\",\n \"keywords\": [\n \"emoji\",\n \"simple\",\n \"emoticons\",\n \"emoticon\",\n \"emojis\",\n \"smiley\",\n \"smileys\",\n \"smilies\",\n \"ideogram\",\n \"ideograms\"\n ],\n \"bugs\": {\n \"url\": \"https://github.com/involvex/node-emoji/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/involvex/node-emoji\"\n },\n \"license\": \"MIT\",\n \"author\": {\n \"name\": \"Involvex\"\n },\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"types\": {\n \"import\": \"./lib/index.d.ts\",\n \"require\": \"./lib/index.d.cts\"\n },\n \"import\": \"./lib/index.js\",\n \"require\": \"./lib/index.cjs\"\n }\n },\n \"main\": \"./lib/index.js\",\n \"bin\": {\n \"emoji-cli\": \"lib/bin/emoji-cli-improved.js\"\n },\n \"files\": [\n \"lib/\",\n \"package.json\",\n \"LICENSE.md\",\n \"README.md\",\n \"bin/emoji-cli.ts\",\n \"src/*\"\n ],\n \"scripts\": {\n \"prebuild\": \"npm run format && npm run lint && npm run typecheck\",\n \"build\": \"tsup\",\n \"build:cli\": \"bun build --target=node bin/emoji-cli-improved.ts --outdir=dist\",\n \"dev\": \"bun run bin/emoji-cli-improved.ts\",\n \"format\": \"prettier . --write\",\n \"lint\": \"eslint . --ignore-pattern lib --ignore-pattern dist -c eslint.config.ts\",\n \"lint:knip\": \"knip\",\n \"lint:md\": \"markdownlint \\\"**/*.md\\\" \\\".github/**/*.md\\\" --rules sentences-per-line\",\n \"lint:package-json\": \"npmPkgJsonLint .\",\n \"lint:packages\": \"pnpm dedupe --check\",\n \"lint:spelling\": \"cspell \\\"**\\\" \\\".github/**/*\\\"\",\n \"prepare\": \"husky install\",\n \"should-semantic-release\": \"should-semantic-release --verbose\",\n \"start\": \"node lib/bin/emoji-cli-improved.js\",\n \"test\": \"vitest\",\n \"test:cjs\": \"node ./src/e2e.cjs\",\n \"tsc\": \"tsc\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"lint-staged\": {\n \"*\": \"prettier --ignore-unknown --write\"\n },\n \"dependencies\": {\n \"@sindresorhus/is\": \"^4.6.0\",\n \"char-regex\": \"^1.0.2\",\n \"emojilib\": \"^2.4.0\",\n \"jiti\": \"^2.6.1\",\n \"skin-tone\": \"^2.0.0\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.2\",\n \"@eslint/json\": \"^0.14.0\",\n \"@release-it/conventional-changelog\": \"^10.0.0\",\n \"@swc/core\": \"^1.3.58\",\n \"@types/eslint\": \"^8.44.7\",\n \"@typescript-eslint/eslint-plugin\": \"^8.0.0\",\n \"@typescript-eslint/parser\": \"^8.0.0\",\n \"@vitest/coverage-v8\": \"^0.34.6\",\n \"console-fail-test\": \"^0.5.0\",\n \"cspell\": \"^8.0.0\",\n \"eslint\": \"^9.39.2\",\n \"eslint-plugin-deprecation\": \"^3.0.0\",\n \"eslint-plugin-eslint-comments\": \"^3.2.0\",\n \"eslint-plugin-jsdoc\": \"^50.0.0\",\n \"eslint-plugin-jsonc\": \"^2.10.0\",\n \"eslint-plugin-markdown\": \"^3.0.1\",\n \"eslint-plugin-n\": \"^17.0.0\",\n \"eslint-plugin-no-only-tests\": \"^3.1.0\",\n \"eslint-plugin-perfectionist\": \"^2.3.0\",\n \"eslint-plugin-regexp\": \"^2.1.1\",\n \"eslint-plugin-vitest\": \"^0.3.9\",\n \"eslint-plugin-yml\": \"^1.10.0\",\n \"globals\": \"^16.5.0\",\n \"husky\": \"^8.0.3\",\n \"jsonc-eslint-parser\": \"^2.4.0\",\n \"knip\": \"^4.0.0\",\n \"lint-staged\": \"^15.1.0\",\n \"markdownlint\": \"^0.37.0\",\n \"markdownlint-cli\": \"^0.44.0\",\n \"npm-package-json-lint\": \"^8.0.0\",\n \"npm-package-json-lint-config-default\": \"^7.0.0\",\n \"prettier\": \"^3.0.3\",\n \"prettier-plugin-curly\": \"^0.3.0\",\n \"prettier-plugin-packagejson\": \"^2.4.6\",\n \"release-it\": \"^18.0.0\",\n \"sentences-per-line\": \"^0.3.0\",\n \"should-semantic-release\": \"^0.2.1\",\n \"tsup\": \"^8.0.0\",\n \"typescript\": \"^5.2.2\",\n \"typescript-eslint\": \"^8.50.1\",\n \"vitest\": \"^0.34.6\",\n \"yaml-eslint-parser\": \"^1.2.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,aAAe;;;ACAf,gBAAuB;;;ACAvB,sBAAqB;;;ACArB,wBAAsB;AAEf,IAAM,uBAAmB,kBAAAC,SAAU;AAEnC,SAAS,WACd,OACsB;AACtB,SAAO,OAAO,UAAU,aAAa,QAAQ,MAAM;AACrD;AAUA,IAAM,mBAAmB,OAAO,aAAa,KAAK;AAElD,IAAM,kBAAkB,IAAI,OAAO,kBAAkB,GAAG;AAOjD,SAAS,cAAc,MAAc;AAC1C,SAAO,KAAK,QAAQ,iBAAiB,EAAE;AACzC;AAEO,SAAS,cAAc,MAAc;AAC1C,SAAO,OAAO,KAAK,IAAI,IAAI,KAAK,MAAM,GAAG,EAAE,IAAI;AACjD;AAEO,SAAS,WAAc,OAAY;AACxC,SAAO,MAAM,KAAK,MAAM,KAAK,OAAO,IAAI,MAAM,MAAM,CAAC;AACvD;;;AD5BO,IAAM,YAAY,OAAO,QAAQ,gBAAAC,QAAS,GAAG,EAAE;AAAA,EACpD,CAAC,CAAC,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK;AAC3C;AAEO,IAAM,mBAAmB,IAAI,IAAI,SAAS;AAE1C,IAAM,mBAAmB,IAAI;AAAA,EAClC,UAAU,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM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jD;AAGA,eAAe,MAAqB;AAClC,MAAI;AACF,UAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AACjC,UAAM,EAAE,SAAS,cAAc,MAAM,aAAa,KAAK,IAAI,UAAU,IAAI;AAGzE,QAAI,QAAQ,CAAC,cAAc;AACzB,eAAS;AACT;AAAA,IACF;AAEA,QAAI,iBAAiB,eAAe,iBAAiB,MAAM;AACzD,kBAAY;AACZ;AAAA,IACF;AACA,QAAI,iBAAiB,aAAa,iBAAiB,MAAM;AACvD,gBAAU;AACV;AAAA,IACF;AAEA,UAAM,UAAU,eAAe,YAAY;AAC3C,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI;AAAA,QACR,oBAAoB,YAAY;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAGA,iBAAa,SAAS,WAAW;AAGjC,UAAM,QAAQ,QAAQ,YAAY,CAAC,CAAC;AAAA,EACtC,SAAS,OAAO;AACd,QAAI,iBAAiB,UAAU;AAC7B,aAAO,MAAM,MAAM,OAAO;AAC1B,cAAQ,KAAK,MAAM,IAAI;AAAA,IACzB,WAAW,iBAAiB,iBAAiB;AAC3C,aAAO,MAAM,MAAM,OAAO;AAC1B,aAAO,KAAK,kCAAkC;AAC9C,cAAQ,KAAK,MAAM,IAAI;AAAA,IACzB,OAAO;AACL,aAAO;AAAA,QACL,qBACE,iBAAiB,QAAQ,MAAM,UAAU,eAC3C;AAAA,MACF;AACA,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF;AACF;AAaA,IAAI;AACJ,IAAO,6BAAQ;","names":["import_is","charRegex","emojilib","is","import_is","import_is","import_is","import_is","import_is","is","import_is","import_is","skinTone"]}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
// package.json
|
|
13
13
|
var package_default = {
|
|
14
14
|
name: "@involvex/emoji-cli",
|
|
15
|
-
version: "2.2.
|
|
15
|
+
version: "2.2.8",
|
|
16
16
|
description: "Friendly emoji lookups and parsing utilities for Node.js. \u{1F496}",
|
|
17
17
|
keywords: [
|
|
18
18
|
"emoji",
|
|
@@ -27,11 +27,11 @@ var package_default = {
|
|
|
27
27
|
"ideograms"
|
|
28
28
|
],
|
|
29
29
|
bugs: {
|
|
30
|
-
url: "https://github.com/
|
|
30
|
+
url: "https://github.com/involvex/node-emoji/issues"
|
|
31
31
|
},
|
|
32
32
|
repository: {
|
|
33
33
|
type: "git",
|
|
34
|
-
url: "https://github.com/
|
|
34
|
+
url: "https://github.com/involvex/node-emoji"
|
|
35
35
|
},
|
|
36
36
|
license: "MIT",
|
|
37
37
|
author: {
|
|
@@ -195,6 +195,13 @@ var COMMANDS = [
|
|
|
195
195
|
description: "Get a random emoji",
|
|
196
196
|
handler: runRandom,
|
|
197
197
|
requiresArgs: false
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "about",
|
|
201
|
+
aliases: ["--about", "-a"],
|
|
202
|
+
description: "Show information about the CLI",
|
|
203
|
+
handler: showabout,
|
|
204
|
+
requiresArgs: false
|
|
198
205
|
}
|
|
199
206
|
];
|
|
200
207
|
var CLIError = class extends Error {
|
|
@@ -293,6 +300,12 @@ async function runSearch(query) {
|
|
|
293
300
|
);
|
|
294
301
|
}
|
|
295
302
|
}
|
|
303
|
+
async function showabout() {
|
|
304
|
+
console.log(`${CONFIG.name} v${CONFIG.version}`);
|
|
305
|
+
console.log(`${CONFIG.description} \u{1F496}`);
|
|
306
|
+
console.log("author: ", package_default.author.name);
|
|
307
|
+
console.log("Repository: ", package_default.repository.url);
|
|
308
|
+
}
|
|
296
309
|
async function runEmojify(text) {
|
|
297
310
|
if (!text) {
|
|
298
311
|
throw new ValidationError("Text to emojify is required");
|
|
@@ -409,6 +422,10 @@ async function run() {
|
|
|
409
422
|
showVersion();
|
|
410
423
|
return;
|
|
411
424
|
}
|
|
425
|
+
if (commandInput === "--about" || commandInput === "-a") {
|
|
426
|
+
showabout();
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
412
429
|
const command = resolveCommand(commandInput);
|
|
413
430
|
if (!command) {
|
|
414
431
|
throw new CLIError(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../package.json","../../bin/emoji-cli-improved.ts"],"sourcesContent":["{\n \"name\": \"@involvex/emoji-cli\",\n \"version\": \"2.2.7\",\n \"description\": \"Friendly emoji lookups and parsing utilities for Node.js. ๐\",\n \"keywords\": [\n \"emoji\",\n \"simple\",\n \"emoticons\",\n \"emoticon\",\n \"emojis\",\n \"smiley\",\n \"smileys\",\n \"smilies\",\n \"ideogram\",\n \"ideograms\"\n ],\n \"bugs\": {\n \"url\": \"https://github.com/omnidan/node-emoji/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/omnidan/node-emoji\"\n },\n \"license\": \"MIT\",\n \"author\": {\n \"name\": \"Involvex\"\n },\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"types\": {\n \"import\": \"./lib/index.d.ts\",\n \"require\": \"./lib/index.d.cts\"\n },\n \"import\": \"./lib/index.js\",\n \"require\": \"./lib/index.cjs\"\n }\n },\n \"main\": \"./lib/index.js\",\n \"bin\": {\n \"emoji-cli\": \"lib/bin/emoji-cli-improved.js\"\n },\n \"files\": [\n \"lib/\",\n \"package.json\",\n \"LICENSE.md\",\n \"README.md\",\n \"bin/emoji-cli.ts\",\n \"src/*\"\n ],\n \"scripts\": {\n \"prebuild\": \"npm run format && npm run lint && npm run typecheck\",\n \"build\": \"tsup\",\n \"build:cli\": \"bun build --target=node bin/emoji-cli-improved.ts --outdir=dist\",\n \"dev\": \"bun run bin/emoji-cli-improved.ts\",\n \"format\": \"prettier . --write\",\n \"lint\": \"eslint . --ignore-pattern lib --ignore-pattern dist -c eslint.config.ts\",\n \"lint:knip\": \"knip\",\n \"lint:md\": \"markdownlint \\\"**/*.md\\\" \\\".github/**/*.md\\\" --rules sentences-per-line\",\n \"lint:package-json\": \"npmPkgJsonLint .\",\n \"lint:packages\": \"pnpm dedupe --check\",\n \"lint:spelling\": \"cspell \\\"**\\\" \\\".github/**/*\\\"\",\n \"prepare\": \"husky install\",\n \"should-semantic-release\": \"should-semantic-release --verbose\",\n \"start\": \"node lib/bin/emoji-cli-improved.js\",\n \"test\": \"vitest\",\n \"test:cjs\": \"node ./src/e2e.cjs\",\n \"tsc\": \"tsc\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"lint-staged\": {\n \"*\": \"prettier --ignore-unknown --write\"\n },\n \"dependencies\": {\n \"@sindresorhus/is\": \"^4.6.0\",\n \"char-regex\": \"^1.0.2\",\n \"emojilib\": \"^2.4.0\",\n \"jiti\": \"^2.6.1\",\n \"skin-tone\": \"^2.0.0\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.2\",\n \"@eslint/json\": \"^0.14.0\",\n \"@release-it/conventional-changelog\": \"^10.0.0\",\n \"@swc/core\": \"^1.3.58\",\n \"@types/eslint\": \"^8.44.7\",\n \"@typescript-eslint/eslint-plugin\": \"^8.0.0\",\n \"@typescript-eslint/parser\": \"^8.0.0\",\n \"@vitest/coverage-v8\": \"^0.34.6\",\n \"console-fail-test\": \"^0.5.0\",\n \"cspell\": \"^8.0.0\",\n \"eslint\": \"^9.39.2\",\n \"eslint-plugin-deprecation\": \"^3.0.0\",\n \"eslint-plugin-eslint-comments\": \"^3.2.0\",\n \"eslint-plugin-jsdoc\": \"^50.0.0\",\n \"eslint-plugin-jsonc\": \"^2.10.0\",\n \"eslint-plugin-markdown\": \"^3.0.1\",\n \"eslint-plugin-n\": \"^17.0.0\",\n \"eslint-plugin-no-only-tests\": \"^3.1.0\",\n \"eslint-plugin-perfectionist\": \"^2.3.0\",\n \"eslint-plugin-regexp\": \"^2.1.1\",\n \"eslint-plugin-vitest\": \"^0.3.9\",\n \"eslint-plugin-yml\": \"^1.10.0\",\n \"globals\": \"^16.5.0\",\n \"husky\": \"^8.0.3\",\n \"jsonc-eslint-parser\": \"^2.4.0\",\n \"knip\": \"^4.0.0\",\n \"lint-staged\": \"^15.1.0\",\n \"markdownlint\": \"^0.37.0\",\n \"markdownlint-cli\": \"^0.44.0\",\n \"npm-package-json-lint\": \"^8.0.0\",\n \"npm-package-json-lint-config-default\": \"^7.0.0\",\n \"prettier\": \"^3.0.3\",\n \"prettier-plugin-curly\": \"^0.3.0\",\n \"prettier-plugin-packagejson\": \"^2.4.6\",\n \"release-it\": \"^18.0.0\",\n \"sentences-per-line\": \"^0.3.0\",\n \"should-semantic-release\": \"^0.2.1\",\n \"tsup\": \"^8.0.0\",\n \"typescript\": \"^5.2.2\",\n \"typescript-eslint\": \"^8.50.1\",\n \"vitest\": \"^0.34.6\",\n \"yaml-eslint-parser\": \"^1.2.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n}\n","#!/usr/bin/env node\n\nimport * as cli from '../src/index'\nimport pkg from '../package.json'\n// Type definitions for better type safety\ninterface CLIConfig {\n name: string\n description: string\n version: string\n}\n\ninterface Command {\n name: string\n aliases: string[]\n description: string\n handler: (args?: string) => void | Promise<void>\n requiresArgs: boolean\n}\n\ninterface ParsedArgs {\n command: string\n args: string[]\n help: boolean\n}\n\n// Configuration\nconst CONFIG: CLIConfig = {\n name: 'emoji-cli',\n description: 'Friendly emoji lookups and parsing utilities for Node.js',\n version: pkg.version as string, // TODO: Get version from package.json dynamically\n}\n\n// Available commands\nconst COMMANDS: Command[] = [\n {\n name: 'search',\n aliases: ['--search'],\n description: 'Search for emojis by name or pattern',\n handler: runSearch,\n requiresArgs: true,\n },\n {\n name: 'emojify',\n aliases: ['--emojify'],\n description: 'Convert text to emojis',\n handler: runEmojify,\n requiresArgs: true,\n },\n {\n name: 'unemojify',\n aliases: ['--unemojify'],\n description: 'Convert emojis back to text',\n handler: runUnemojify,\n requiresArgs: true,\n },\n {\n name: 'get',\n aliases: ['--get'],\n description: 'Get a specific emoji by name',\n handler: runGet,\n requiresArgs: true,\n },\n {\n name: 'has',\n aliases: ['--has'],\n description: 'Check if an emoji exists',\n handler: runHas,\n requiresArgs: true,\n },\n {\n name: 'find',\n aliases: ['--find', '-f'],\n description: 'Find emojis by name',\n handler: runFind,\n requiresArgs: true,\n },\n {\n name: 'random',\n aliases: ['--random', '--rnd', '-r'],\n description: 'Get a random emoji',\n handler: runRandom,\n requiresArgs: false,\n },\n]\n\n// Error handling\nclass CLIError extends Error {\n code: number\n\n constructor(message: string, code: number) {\n super(message)\n this.code = code\n this.name = 'CLIError'\n }\n}\n\nclass ValidationError extends CLIError {\n constructor(message: string) {\n super(message, 2)\n this.name = 'ValidationError'\n }\n}\n\n// Utility functions\nfunction createOutputFormatter() {\n return {\n success: (\n data:\n | never\n | string\n | {\n emoji: string\n name?: string\n key?: string\n }\n | (\n | string\n | {\n emoji: string\n name?: string\n key?: string\n }\n )[],\n ) => {\n if (Array.isArray(data)) {\n if (data.length === 0) {\n console.log('No results found')\n return\n }\n\n data.forEach((item, index) => {\n if (typeof item === 'string') {\n console.log(`${item}`)\n } else if (item && typeof item === 'object') {\n const displayName = item.name || item.key || 'unknown'\n console.log(`${index + 1}. ${item.emoji} ${displayName}`)\n } else {\n console.log(`${index + 1}. ${item}`)\n }\n })\n } else if (data && typeof data === 'object') {\n const displayName = data.name || data.key || 'unknown'\n console.log(`${data.emoji} ${displayName}`)\n } else if (data !== undefined && data !== null) {\n console.log(data)\n } else {\n console.log('No result found')\n }\n },\n error: (message: string) => {\n console.error(`โ Error: ${message}`)\n },\n warning: (message: string) => {\n console.warn(`โ ๏ธ Warning: ${message}`)\n },\n info: (message: string) => {\n console.log(`โน๏ธ ${message}`)\n },\n }\n}\n\nconst output = createOutputFormatter()\n\n// Argument parsing\nfunction parseArgs(args: string[]): ParsedArgs {\n if (args.length === 0) {\n return { command: '', args: [], help: true }\n }\n\n const [first, ...rest] = args\n\n // Check for help flags\n if (first === '--help' || first === '-h') {\n return { command: '', args: [], help: true }\n }\n\n return {\n command: first,\n args: rest,\n help: false,\n }\n}\n\n// Command resolution\nfunction resolveCommand(input: string): Command | null {\n if (!input) {\n return null\n }\n\n return (\n COMMANDS.find(cmd => cmd.name === input || cmd.aliases.includes(input)) ||\n null\n )\n}\n\n// Validation\nfunction validateArgs(command: Command, args: string[]): void {\n if (command.requiresArgs && args.length === 0) {\n throw new ValidationError(`Command \"${command.name}\" requires arguments`)\n }\n\n if (!command.requiresArgs && args.length > 0) {\n throw new ValidationError(\n `Command \"${command.name}\" does not accept arguments`,\n )\n }\n}\n\n// Command handlers\nasync function runSearch(query?: string): Promise<void> {\n if (!query) {\n throw new ValidationError('Search query is required')\n }\n\n try {\n const results = cli.search(query)\n output.success(results)\n } catch (error) {\n output.error(\n `Failed to search for \"${query}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runEmojify(text?: string): Promise<void> {\n if (!text) {\n throw new ValidationError('Text to emojify is required')\n }\n\n try {\n const result = cli.emojify(text)\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to emojify text: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runUnemojify(text?: string): Promise<void> {\n if (!text) {\n throw new ValidationError('Text to unemojify is required')\n }\n\n try {\n const result = cli.unemojify(text)\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to unemojify text: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runGet(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Emoji name is required')\n }\n\n try {\n const result = cli.get(name)\n if (result) {\n output.success(result)\n } else {\n output.warning(`Emoji \"${name}\" not found`)\n }\n } catch (error) {\n output.error(\n `Failed to get emoji \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runHas(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Emoji name is required')\n }\n\n try {\n const result = cli.has(name)\n output.success(\n result ? `โ
Emoji \"${name}\" exists` : `โ Emoji \"${name}\" not found`,\n )\n } catch (error) {\n output.error(\n `Failed to check emoji \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runFind(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Search term is required')\n }\n\n try {\n const result = cli.find(name)\n if (result) {\n output.success(result)\n } else {\n output.warning(`No emojis found for \"${name}\"`)\n }\n } catch (error) {\n output.error(\n `Failed to find emojis for \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runRandom(): Promise<void> {\n try {\n const result = cli.random()\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to get random emoji: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\n// Help and usage information\nfunction showHelp(): void {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n console.log(`${CONFIG.description} ๐`)\n console.log('\\nUsage:')\n console.log(` ${CONFIG.name} <command> [arguments]`)\n console.log('\\nCommands:')\n\n COMMANDS.forEach(cmd => {\n const aliasesText =\n cmd.aliases.length > 1 ? ` (${cmd.aliases.join(', ')})` : ''\n console.log(` ${cmd.name}${aliasesText} ${cmd.description}`)\n })\n\n console.log('\\nExamples:')\n console.log(` ${CONFIG.name} --search \"heart\"`)\n console.log(` ${CONFIG.name} --get \"heart\"`)\n console.log(` ${CONFIG.name} --emojify \"I love you\"`)\n console.log(` ${CONFIG.name} --random`)\n}\n\nfunction showVersion(): void {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n}\n\n// Main execution\nasync function run(): Promise<void> {\n try {\n const args = process.argv.slice(2)\n const { command: commandInput, args: commandArgs, help } = parseArgs(args)\n\n // Handle global flags\n if (help || !commandInput) {\n showHelp()\n return\n }\n\n if (commandInput === '--version' || commandInput === '-v') {\n showVersion()\n return\n }\n\n // Resolve and execute command\n const command = resolveCommand(commandInput)\n if (!command) {\n throw new CLIError(\n `Unknown command: ${commandInput}. Use --help for available commands.`,\n 1,\n )\n }\n\n // Validate arguments\n validateArgs(command, commandArgs)\n\n // Execute command\n await command.handler(commandArgs[0])\n } catch (error) {\n if (error instanceof CLIError) {\n output.error(error.message)\n process.exit(error.code)\n } else if (error instanceof ValidationError) {\n output.error(error.message)\n output.info('Use --help for usage information')\n process.exit(error.code)\n } else {\n output.error(\n `Unexpected error: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n process.exit(1)\n }\n }\n}\n\n// Execute if this file is run directly\n// if (import.meta.url === `file://${process.argv[1]}`) {\n// run().catch(error => {\n// output.error(\n// `Failed to run CLI: ${\n// error instanceof Error ? error.message : 'Unknown error'\n// }`,\n// )\n// process.exit(1)\n// })\n// }\nrun()\nexport default run\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,SAAW;AAAA,EACX,QAAU;AAAA,IACR,MAAQ;AAAA,EACV;AAAA,EACA,MAAQ;AAAA,EACR,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,QACP,QAAU;AAAA,QACV,SAAW;AAAA,MACb;AAAA,MACA,QAAU;AAAA,MACV,SAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,MAAQ;AAAA,EACR,KAAO;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,UAAY;AAAA,IACZ,OAAS;AAAA,IACT,aAAa;AAAA,IACb,KAAO;AAAA,IACP,QAAU;AAAA,IACV,MAAQ;AAAA,IACR,aAAa;AAAA,IACb,WAAW;AAAA,IACX,qBAAqB;AAA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AAI,UAAU,IAAI;AAGzE,QAAI,QAAQ,CAAC,cAAc;AACzB,eAAS;AACT;AAAA,IACF;AAEA,QAAI,iBAAiB,eAAe,iBAAiB,MAAM;AACzD,kBAAY;AACZ;AAAA,IACF;AAGA,UAAM,UAAU,eAAe,YAAY;AAC3C,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI;AAAA,QACR,oBAAoB,YAAY;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAGA,iBAAa,SAAS,WAAW;AAGjC,UAAM,QAAQ,QAAQ,YAAY,CAAC,CAAC;AAAA,EACtC,SAAS,OAAO;AACd,QAAI,iBAAiB,UAAU;AAC7B,aAAO,MAAM,MAAM,OAAO;AAC1B,cAAQ,KAAK,MAAM,IAAI;AAAA,IACzB,WAAW,iBAAiB,iBAAiB;AAC3C,aAAO,MAAM,MAAM,OAAO;AAC1B,aAAO,KAAK,kCAAkC;AAC9C,cAAQ,KAAK,MAAM,IAAI;AAAA,IACzB,OAAO;AACL,aAAO;AAAA,QACL,qBACE,iBAAiB,QAAQ,MAAM,UAAU,eAC3C;AAAA,MACF;AACA,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF;AACF;AAaA,IAAI;AACJ,IAAO,6BAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../package.json","../../bin/emoji-cli-improved.ts"],"sourcesContent":["{\n \"name\": \"@involvex/emoji-cli\",\n \"version\": \"2.2.8\",\n \"description\": \"Friendly emoji lookups and parsing utilities for Node.js. ๐\",\n \"keywords\": [\n \"emoji\",\n \"simple\",\n \"emoticons\",\n \"emoticon\",\n \"emojis\",\n \"smiley\",\n \"smileys\",\n \"smilies\",\n \"ideogram\",\n \"ideograms\"\n ],\n \"bugs\": {\n \"url\": \"https://github.com/involvex/node-emoji/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/involvex/node-emoji\"\n },\n \"license\": \"MIT\",\n \"author\": {\n \"name\": \"Involvex\"\n },\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"types\": {\n \"import\": \"./lib/index.d.ts\",\n \"require\": \"./lib/index.d.cts\"\n },\n \"import\": \"./lib/index.js\",\n \"require\": \"./lib/index.cjs\"\n }\n },\n \"main\": \"./lib/index.js\",\n \"bin\": {\n \"emoji-cli\": \"lib/bin/emoji-cli-improved.js\"\n },\n \"files\": [\n \"lib/\",\n \"package.json\",\n \"LICENSE.md\",\n \"README.md\",\n \"bin/emoji-cli.ts\",\n \"src/*\"\n ],\n \"scripts\": {\n \"prebuild\": \"npm run format && npm run lint && npm run typecheck\",\n \"build\": \"tsup\",\n \"build:cli\": \"bun build --target=node bin/emoji-cli-improved.ts --outdir=dist\",\n \"dev\": \"bun run bin/emoji-cli-improved.ts\",\n \"format\": \"prettier . --write\",\n \"lint\": \"eslint . --ignore-pattern lib --ignore-pattern dist -c eslint.config.ts\",\n \"lint:knip\": \"knip\",\n \"lint:md\": \"markdownlint \\\"**/*.md\\\" \\\".github/**/*.md\\\" --rules sentences-per-line\",\n \"lint:package-json\": \"npmPkgJsonLint .\",\n \"lint:packages\": \"pnpm dedupe --check\",\n \"lint:spelling\": \"cspell \\\"**\\\" \\\".github/**/*\\\"\",\n \"prepare\": \"husky install\",\n \"should-semantic-release\": \"should-semantic-release --verbose\",\n \"start\": \"node lib/bin/emoji-cli-improved.js\",\n \"test\": \"vitest\",\n \"test:cjs\": \"node ./src/e2e.cjs\",\n \"tsc\": \"tsc\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"lint-staged\": {\n \"*\": \"prettier --ignore-unknown --write\"\n },\n \"dependencies\": {\n \"@sindresorhus/is\": \"^4.6.0\",\n \"char-regex\": \"^1.0.2\",\n \"emojilib\": \"^2.4.0\",\n \"jiti\": \"^2.6.1\",\n \"skin-tone\": \"^2.0.0\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^9.39.2\",\n \"@eslint/json\": \"^0.14.0\",\n \"@release-it/conventional-changelog\": \"^10.0.0\",\n \"@swc/core\": \"^1.3.58\",\n \"@types/eslint\": \"^8.44.7\",\n \"@typescript-eslint/eslint-plugin\": \"^8.0.0\",\n \"@typescript-eslint/parser\": \"^8.0.0\",\n \"@vitest/coverage-v8\": \"^0.34.6\",\n \"console-fail-test\": \"^0.5.0\",\n \"cspell\": \"^8.0.0\",\n \"eslint\": \"^9.39.2\",\n \"eslint-plugin-deprecation\": \"^3.0.0\",\n \"eslint-plugin-eslint-comments\": \"^3.2.0\",\n \"eslint-plugin-jsdoc\": \"^50.0.0\",\n \"eslint-plugin-jsonc\": \"^2.10.0\",\n \"eslint-plugin-markdown\": \"^3.0.1\",\n \"eslint-plugin-n\": \"^17.0.0\",\n \"eslint-plugin-no-only-tests\": \"^3.1.0\",\n \"eslint-plugin-perfectionist\": \"^2.3.0\",\n \"eslint-plugin-regexp\": \"^2.1.1\",\n \"eslint-plugin-vitest\": \"^0.3.9\",\n \"eslint-plugin-yml\": \"^1.10.0\",\n \"globals\": \"^16.5.0\",\n \"husky\": \"^8.0.3\",\n \"jsonc-eslint-parser\": \"^2.4.0\",\n \"knip\": \"^4.0.0\",\n \"lint-staged\": \"^15.1.0\",\n \"markdownlint\": \"^0.37.0\",\n \"markdownlint-cli\": \"^0.44.0\",\n \"npm-package-json-lint\": \"^8.0.0\",\n \"npm-package-json-lint-config-default\": \"^7.0.0\",\n \"prettier\": \"^3.0.3\",\n \"prettier-plugin-curly\": \"^0.3.0\",\n \"prettier-plugin-packagejson\": \"^2.4.6\",\n \"release-it\": \"^18.0.0\",\n \"sentences-per-line\": \"^0.3.0\",\n \"should-semantic-release\": \"^0.2.1\",\n \"tsup\": \"^8.0.0\",\n \"typescript\": \"^5.2.2\",\n \"typescript-eslint\": \"^8.50.1\",\n \"vitest\": \"^0.34.6\",\n \"yaml-eslint-parser\": \"^1.2.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n}\n","#!/usr/bin/env node\n\nimport * as cli from '../src/index'\nimport pkg from '../package.json'\n// Type definitions for better type safety\ninterface CLIConfig {\n name: string\n description: string\n version: string\n}\n\ninterface Command {\n name: string\n aliases: string[]\n description: string\n handler: (args?: string) => void | Promise<void>\n requiresArgs: boolean\n}\n\ninterface ParsedArgs {\n command: string\n args: string[]\n help: boolean\n}\n\n// Configuration\nconst CONFIG: CLIConfig = {\n name: 'emoji-cli',\n description: 'Friendly emoji lookups and parsing utilities for Node.js',\n version: pkg.version as string, // TODO: Get version from package.json dynamically\n}\n\n// Available commands\nconst COMMANDS: Command[] = [\n {\n name: 'search',\n aliases: ['--search'],\n description: 'Search for emojis by name or pattern',\n handler: runSearch,\n requiresArgs: true,\n },\n {\n name: 'emojify',\n aliases: ['--emojify'],\n description: 'Convert text to emojis',\n handler: runEmojify,\n requiresArgs: true,\n },\n {\n name: 'unemojify',\n aliases: ['--unemojify'],\n description: 'Convert emojis back to text',\n handler: runUnemojify,\n requiresArgs: true,\n },\n {\n name: 'get',\n aliases: ['--get'],\n description: 'Get a specific emoji by name',\n handler: runGet,\n requiresArgs: true,\n },\n {\n name: 'has',\n aliases: ['--has'],\n description: 'Check if an emoji exists',\n handler: runHas,\n requiresArgs: true,\n },\n {\n name: 'find',\n aliases: ['--find', '-f'],\n description: 'Find emojis by name',\n handler: runFind,\n requiresArgs: true,\n },\n {\n name: 'random',\n aliases: ['--random', '--rnd', '-r'],\n description: 'Get a random emoji',\n handler: runRandom,\n requiresArgs: false,\n },\n {\n name: 'about',\n aliases: ['--about', '-a'],\n description: 'Show information about the CLI',\n handler: showabout,\n requiresArgs: false,\n },\n]\n\n// Error handling\nclass CLIError extends Error {\n code: number\n\n constructor(message: string, code: number) {\n super(message)\n this.code = code\n this.name = 'CLIError'\n }\n}\n\nclass ValidationError extends CLIError {\n constructor(message: string) {\n super(message, 2)\n this.name = 'ValidationError'\n }\n}\n\n// Utility functions\nfunction createOutputFormatter() {\n return {\n success: (\n data:\n | never\n | string\n | {\n emoji: string\n name?: string\n key?: string\n }\n | (\n | string\n | {\n emoji: string\n name?: string\n key?: string\n }\n )[],\n ) => {\n if (Array.isArray(data)) {\n if (data.length === 0) {\n console.log('No results found')\n return\n }\n\n data.forEach((item, index) => {\n if (typeof item === 'string') {\n console.log(`${item}`)\n } else if (item && typeof item === 'object') {\n const displayName = item.name || item.key || 'unknown'\n console.log(`${index + 1}. ${item.emoji} ${displayName}`)\n } else {\n console.log(`${index + 1}. ${item}`)\n }\n })\n } else if (data && typeof data === 'object') {\n const displayName = data.name || data.key || 'unknown'\n console.log(`${data.emoji} ${displayName}`)\n } else if (data !== undefined && data !== null) {\n console.log(data)\n } else {\n console.log('No result found')\n }\n },\n error: (message: string) => {\n console.error(`โ Error: ${message}`)\n },\n warning: (message: string) => {\n console.warn(`โ ๏ธ Warning: ${message}`)\n },\n info: (message: string) => {\n console.log(`โน๏ธ ${message}`)\n },\n }\n}\n\nconst output = createOutputFormatter()\n\n// Argument parsing\nfunction parseArgs(args: string[]): ParsedArgs {\n if (args.length === 0) {\n return { command: '', args: [], help: true }\n }\n\n const [first, ...rest] = args\n\n // Check for help flags\n if (first === '--help' || first === '-h') {\n return { command: '', args: [], help: true }\n }\n\n return {\n command: first,\n args: rest,\n help: false,\n }\n}\n\n// Command resolution\nfunction resolveCommand(input: string): Command | null {\n if (!input) {\n return null\n }\n\n return (\n COMMANDS.find(cmd => cmd.name === input || cmd.aliases.includes(input)) ||\n null\n )\n}\n\n// Validation\nfunction validateArgs(command: Command, args: string[]): void {\n if (command.requiresArgs && args.length === 0) {\n throw new ValidationError(`Command \"${command.name}\" requires arguments`)\n }\n\n if (!command.requiresArgs && args.length > 0) {\n throw new ValidationError(\n `Command \"${command.name}\" does not accept arguments`,\n )\n }\n}\n\n// Command handlers\nasync function runSearch(query?: string): Promise<void> {\n if (!query) {\n throw new ValidationError('Search query is required')\n }\n\n try {\n const results = cli.search(query)\n output.success(results)\n } catch (error) {\n output.error(\n `Failed to search for \"${query}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\nasync function showabout() {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n console.log(`${CONFIG.description} ๐`)\n console.log('author: ', pkg.author.name)\n console.log('Repository: ', pkg.repository.url)\n}\n\nasync function runEmojify(text?: string): Promise<void> {\n if (!text) {\n throw new ValidationError('Text to emojify is required')\n }\n\n try {\n const result = cli.emojify(text)\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to emojify text: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runUnemojify(text?: string): Promise<void> {\n if (!text) {\n throw new ValidationError('Text to unemojify is required')\n }\n\n try {\n const result = cli.unemojify(text)\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to unemojify text: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runGet(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Emoji name is required')\n }\n\n try {\n const result = cli.get(name)\n if (result) {\n output.success(result)\n } else {\n output.warning(`Emoji \"${name}\" not found`)\n }\n } catch (error) {\n output.error(\n `Failed to get emoji \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runHas(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Emoji name is required')\n }\n\n try {\n const result = cli.has(name)\n output.success(\n result ? `โ
Emoji \"${name}\" exists` : `โ Emoji \"${name}\" not found`,\n )\n } catch (error) {\n output.error(\n `Failed to check emoji \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runFind(name?: string): Promise<void> {\n if (!name) {\n throw new ValidationError('Search term is required')\n }\n\n try {\n const result = cli.find(name)\n if (result) {\n output.success(result)\n } else {\n output.warning(`No emojis found for \"${name}\"`)\n }\n } catch (error) {\n output.error(\n `Failed to find emojis for \"${name}\": ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\nasync function runRandom(): Promise<void> {\n try {\n const result = cli.random()\n output.success(result)\n } catch (error) {\n output.error(\n `Failed to get random emoji: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n }\n}\n\n// Help and usage information\nfunction showHelp(): void {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n console.log(`${CONFIG.description} ๐`)\n console.log('\\nUsage:')\n console.log(` ${CONFIG.name} <command> [arguments]`)\n console.log('\\nCommands:')\n\n COMMANDS.forEach(cmd => {\n const aliasesText =\n cmd.aliases.length > 1 ? ` (${cmd.aliases.join(', ')})` : ''\n console.log(` ${cmd.name}${aliasesText} ${cmd.description}`)\n })\n\n console.log('\\nExamples:')\n console.log(` ${CONFIG.name} --search \"heart\"`)\n console.log(` ${CONFIG.name} --get \"heart\"`)\n console.log(` ${CONFIG.name} --emojify \"I love you\"`)\n console.log(` ${CONFIG.name} --random`)\n}\n\nfunction showVersion(): void {\n console.log(`${CONFIG.name} v${CONFIG.version}`)\n}\n\n// Main execution\nasync function run(): Promise<void> {\n try {\n const args = process.argv.slice(2)\n const { command: commandInput, args: commandArgs, help } = parseArgs(args)\n\n // Handle global flags\n if (help || !commandInput) {\n showHelp()\n return\n }\n\n if (commandInput === '--version' || commandInput === '-v') {\n showVersion()\n return\n }\n if (commandInput === '--about' || commandInput === '-a') {\n showabout()\n return\n }\n // Resolve and execute command\n const command = resolveCommand(commandInput)\n if (!command) {\n throw new CLIError(\n `Unknown command: ${commandInput}. Use --help for available commands.`,\n 1,\n )\n }\n\n // Validate arguments\n validateArgs(command, commandArgs)\n\n // Execute command\n await command.handler(commandArgs[0])\n } catch (error) {\n if (error instanceof CLIError) {\n output.error(error.message)\n process.exit(error.code)\n } else if (error instanceof ValidationError) {\n output.error(error.message)\n output.info('Use --help for usage information')\n process.exit(error.code)\n } else {\n output.error(\n `Unexpected error: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n )\n process.exit(1)\n }\n }\n}\n\n// Execute if this file is run directly\n// if (import.meta.url === `file://${process.argv[1]}`) {\n// run().catch(error => {\n// output.error(\n// `Failed to run CLI: ${\n// error instanceof Error ? error.message : 'Unknown error'\n// }`,\n// )\n// process.exit(1)\n// })\n// }\nrun()\nexport default run\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,SAAW;AAAA,EACX,QAAU;AAAA,IACR,MAAQ;AAAA,EACV;AAAA,EACA,MAAQ;AAAA,EACR,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,QACP,QAAU;AAAA,QACV,SAAW;AAAA,MACb;AAAA,MACA,QAAU;AAAA,MACV,SAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,MAAQ;AAAA,EACR,KAAO;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,UAAY;AAAA,IACZ,OAAS;AAAA,IACT,aAAa;AAAA,IACb,KAAO;AAAA,IACP,QAAU;AAAA,IACV,MAAQ;AAAA,IACR,aAAa;AAAA,IACb,WAAW;AAAA,IACX,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,SAAW;AAAA,IACX,2BAA2B;AAAA,IAC3B,OAAS;AAAA,IACT,MAAQ;AAAA,IACR,YAAY;AAAA,IACZ,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACb,KAAK;AAAA,EACP;AAAA,EACA,cAAgB;AAAA,IACd,oBAAoB;AAAA,IACpB,cAAc;AAAA,I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AK,MAAM,CAAC;AACjC,UAAM,EAAE,SAAS,cAAc,MAAM,aAAa,KAAK,IAAI,UAAU,IAAI;AAGzE,QAAI,QAAQ,CAAC,cAAc;AACzB,eAAS;AACT;AAAA,IACF;AAEA,QAAI,iBAAiB,eAAe,iBAAiB,MAAM;AACzD,kBAAY;AACZ;AAAA,IACF;AACA,QAAI,iBAAiB,aAAa,iBAAiB,MAAM;AACvD,gBAAU;AACV;AAAA,IACF;AAEA,UAAM,UAAU,eAAe,YAAY;AAC3C,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI;AAAA,QACR,oBAAoB,YAAY;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAGA,iBAAa,SAAS,WAAW;AAGjC,UAAM,QAAQ,QAAQ,YAAY,CAAC,CAAC;AAAA,EACtC,SAAS,OAAO;AACd,QAAI,iBAAiB,UAAU;AAC7B,aAAO,MAAM,MAAM,OAAO;AAC1B,cAAQ,KAAK,MAAM,IAAI;AAAA,IACzB,WAAW,iBAAiB,iBAAiB;AAC3C,aAAO,MAAM,MAAM,OAAO;AAC1B,aAAO,KAAK,kCAAkC;AAC9C,cAAQ,KAAK,MAAM,IAAI;AAAA,IACzB,OAAO;AACL,aAAO;AAAA,QACL,qBACE,iBAAiB,QAAQ,MAAM,UAAU,eAC3C;AAAA,MACF;AACA,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF;AACF;AAaA,IAAI;AACJ,IAAO,6BAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@involvex/emoji-cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.8",
|
|
4
4
|
"description": "Friendly emoji lookups and parsing utilities for Node.js. ๐",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"emoji",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"ideograms"
|
|
16
16
|
],
|
|
17
17
|
"bugs": {
|
|
18
|
-
"url": "https://github.com/
|
|
18
|
+
"url": "https://github.com/involvex/node-emoji/issues"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "https://github.com/
|
|
22
|
+
"url": "https://github.com/involvex/node-emoji"
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"author": {
|