-
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
wlb-role-helper
1.0.20 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i wlb-role-helper
Weekly Downloads
1
Version
1.0.20
License
UNLICENSED
Unpacked Size
17 kB
Total Files
7