refactor
This commit is contained in:
parent
28ec943a52
commit
78725c1d14
45 changed files with 698 additions and 766 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue