Created
July 16, 2023 08:27
-
-
Save ms314006/5986d8b58f8b0ef33ae710923f78a03b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserPermissionHandler { | |
constructor(user) { | |
this.user = (user || {}); | |
} | |
get isLogin() { | |
return Boolean(this.user.token); | |
} | |
get isMobileVerified() { | |
return Boolean(this.user.mobile && this.user.isMobileVerified); | |
} | |
get isEmailVerified() { | |
return Boolean(this.user.email && this.user.isEmailVerified); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment