-
Install
npm:
npm install --save wlb-role-helper
yarn
yarn add wlb-role-helper
-
Usage
const { getGlobalRoles, getOrgRoles, Roles } = require('wlb-role-helper'); let gLobalRoles = getGlobalRoles("10"); // ["student"] let orgRoles = getOrgRoles("00010001"); // ["organization-hr-admin", "organization-supervisor"] if(orgRoles.includes(Roles.ORGANIZATION_SUPERVISOR)){ // true } const getRoleNumber = getRoleFromValueToNumber([0,3]); // 10010000
See Test for details.
-
Test
Run
npm test
-
Notifications
You must be signed in to change notification settings - Fork 0
worklifebeyond/wlb-role-helper-js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Role helper for JavaScript
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published