Files
buzz-sheet/lib/commission/reaction.ts
T
2026-10-02 17:33:14 +07:00

8 lines
257 B
TypeScript

import emojiRegex from "emoji-regex";
export function isSingleEmoji(value: string): boolean {
if (!value || value.length > 64) return false;
const matches = [...value.matchAll(emojiRegex())];
return matches.length === 1 && matches[0][0] === value;
}