function fetchTwemojiSvg
fetchTwemojiSvg(
emoji: string,
cp: string
): Promise<string>

Returns Twemoji's SVG for emoji, whose file name cp comes from emojiToCodepoint. emoji only serves the error message. It fetches with plain fetch, since the host is fixed, and gives up after 15 s.

Parameters

emoji: string
cp: string

Return Type

Promise<string>

Throws

Error

When the glyph can't be fetched.

Usage

import { fetchTwemojiSvg } from "api/remote/twemoji.ts";