shortcuts dev...

This commit is contained in:
Gabe Yuan
2023-09-07 18:12:45 +08:00
parent da13f5e218
commit d8b0cc4834
8 changed files with 11006 additions and 15315 deletions

View File

@@ -139,3 +139,14 @@ export const sha256 = async (text, salt) => {
* @returns
*/
export const genEventName = () => btoa(Math.random()).slice(3, 11);
/**
* 判断两个 Set 是否相同
* @param {*} a
* @param {*} b
* @returns
*/
export const isSameSet = (a, b) => {
const s = new Set([...a, ...b]);
return s.size === a.size && s.size === b.size;
};