You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

emoji.ts 303B

1234567891011
  1. import { SearchIndex } from 'emoji-mart'
  2. import type { Emoji } from '@emoji-mart/data'
  3. export async function searchEmoji(value: string) {
  4. const emojis: Emoji[] = await SearchIndex.search(value) || []
  5. const results = emojis.map((emoji) => {
  6. return emoji.skins[0].native
  7. })
  8. return results
  9. }