This commit is contained in:
codytseng
2025-07-19 17:24:51 +08:00
parent 28ec943a52
commit 78725c1d14
45 changed files with 698 additions and 766 deletions

View File

@@ -49,6 +49,14 @@ export function isInViewport(el: HTMLElement) {
)
}
export function isEmail(email: string) {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)
}
export function isDevEnv() {
return process.env.NODE_ENV === 'development'
}
export function detectLanguage(text?: string): string | null {
if (!text) {
return null