1 | type EmojifyFormat = (name: string, part?: string, input?: string) => string;
|
2 | interface EmojifyOptions {
|
3 | |
4 |
|
5 |
|
6 | fallback?: ((part: string) => string) | string;
|
7 | /**
|
8 | * Adds a middleware layer to modify each matched emoji after parsing.
|
9 | */
|
10 | format?: EmojifyFormat;
|
11 | }
|
12 | /**
|
13 | * Parse all markdown-encoded emojis in a string.
|
14 | */
|
15 | declare const emojify: (input: string, { fallback, format }?: EmojifyOptions) => string;
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | declare const find: (codeOrName: string) => {
|
21 | emoji: string;
|
22 | key: string;
|
23 | } | undefined;
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | declare const get: (codeOrName: string) => string | undefined;
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | declare const has: (codeOrName: string) => boolean;
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | declare const random: () => {
|
39 | emoji: string;
|
40 | name: string;
|
41 | };
|
42 |
|
43 | interface Emoji {
|
44 | emoji: string;
|
45 | key: string;
|
46 | }
|
47 |
|
48 | type ReplaceReplacement = (emoji: Emoji, index: number, string: string) => string;
|
49 |
|
50 |
|
51 |
|
52 | declare const replace: (input: string, replacement: ReplaceReplacement | string, { preserveSpaces }?: {
|
53 | preserveSpaces?: boolean | undefined;
|
54 | }) => string;
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | declare const search: (keyword: RegExp | string) => {
|
60 | emoji: string;
|
61 | name: string;
|
62 | }[];
|
63 |
|
64 | interface StripOptions {
|
65 | |
66 |
|
67 |
|
68 | preserveSpaces?: boolean;
|
69 | }
|
70 |
|
71 |
|
72 |
|
73 | declare const strip: (input: string, { preserveSpaces }?: StripOptions) => string;
|
74 |
|
75 |
|
76 |
|
77 |
|
78 | declare const unemojify: (input: string) => string;
|
79 |
|
80 | interface WhichOptions {
|
81 | markdown?: boolean;
|
82 | }
|
83 |
|
84 |
|
85 |
|
86 | declare const which: (emoji: string, { markdown }?: WhichOptions) => string | undefined;
|
87 |
|
88 | export { type EmojifyFormat, type EmojifyOptions, type ReplaceReplacement, type StripOptions, type WhichOptions, emojify, find, get, has, random, replace, search, strip, unemojify, which };
|