1.4.1 • Published 6 years ago

is-user v1.4.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Is-User

#An utility to check if a role is assigned to an user.

travis build version MIT License XO code style

#How to use

const isUser = require('is-user');
export.update = function(req, res){

    //chaching the roles for future use in this function"
    const userArr = ['user', 'admin', 'manager', 'superadmin', 'ceo'];

    isUser.cache(userArr);
    
    let isAdmin =  isUser.is('admin'); //true
    let isManager = isUser.is('manager'); //true
}
1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago