I am trying to check if a particular string is not equal to example strings like this
const role = 'operations'
const perms = 'super-admin' || 'admin' || 'staff' || 'operations'
if (role !== perms) {
throw new UnauthorizedROLE();
}
This how ever always throws the error but if I just do
if (role !== operations) {
throw new UnauthorizedROLE();
}
this one succeeds. How can I check with multiple like that and succeed