Render emoji like a sticker

This commit is contained in:
Josh Perez 2021-10-06 13:37:53 -04:00 committed by GitHub
parent 1466f9f1b2
commit 7c9b8e919c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 97 additions and 30 deletions

View file

@ -0,0 +1,9 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as grapheme from './grapheme';
import { getEmojiCount } from '../components/emoji/lib';
export function isEmojiOnlyText(text: string): boolean {
return grapheme.count(text) === getEmojiCount(text);
}