2024-04-28 10:10:03 +08:00

9 lines
292 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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