refactor
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user