This commit is contained in:
qsh
2024-01-25 08:59:04 +08:00
parent 4fd6a21f35
commit 056ca965b3
79 changed files with 8726 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
// @ts-nocheck
/**
* 判断给定的路径是否为Base64编码的图像路径
* @param path 图像路径
* @returns 如果路径是Base64编码则返回true否则返回false
*/
export const isBase64 = (path: string): boolean => {
return /^data:image\/(\w+);base64/.test(path);
};