wlb-role-helper
v1.0.20
Published
WorkLifeBeyond role helper for JavaScript
Downloads
3
Readme
WorkLifeBeyond role helper for JavaScript
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