This commit is contained in:
Vanessa 2022-11-02 18:46:34 +08:00
parent ba8d07b3d0
commit 5b669b6091
3 changed files with 18 additions and 2 deletions

View file

@ -2,6 +2,10 @@ export const isMobile = () => {
return !document.getElementById("dockBottom");
};
export const isTouchDevice = () => {
return ("ontouchstart" in window) || navigator.maxTouchPoints > 0;
};
export const isArrayEqual = (arr1: string[], arr2: string[]) => {
return arr1.length === arr2.length && arr1.every((item) => arr2.includes(item));
};