This commit is contained in:
Aakansha Doshi 2021-02-07 20:03:37 +05:30
parent 69a1b74e05
commit 63af29d345
7 changed files with 101 additions and 17 deletions

View file

@ -381,6 +381,9 @@ export const getVersion = () => {
);
};
export const formatTime = (time: number): string => {
return time < 1000 ? `${time} ms` : `${(time / 1000).toFixed(1)} s`;
};
// Adapted from https://github.com/Modernizr/Modernizr/blob/master/feature-detects/emoji.js
export const supportsEmoji = () => {
const canvas = document.createElement("canvas");