Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « support « emoji « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ed9bfb8bc78e4f552bd63aa862b44445b5d16c2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import isEmojiUnicodeSupported from './is_emoji_unicode_supported';
import getUnicodeSupportMap from './unicode_support_map';

// cache browser support map between calls
let browserUnicodeSupportMap;

export default function isEmojiUnicodeSupportedByBrowser(emojiUnicode, unicodeVersion) {
  // Our Spec browser would fail producing emoji maps
  if (/\bHeadlessChrome\//.test(navigator.userAgent)) return true;

  browserUnicodeSupportMap = browserUnicodeSupportMap || getUnicodeSupportMap();
  return isEmojiUnicodeSupported(browserUnicodeSupportMap, emojiUnicode, unicodeVersion);
}