rbac icon indicating copy to clipboard operation
rbac copied to clipboard

RBAC is not a constructor

Open rustam87 opened this issue 6 years ago • 1 comments

v.5.0.3

var RBAC = require('rbac');

return

{ __esModule: true,
  RBAC: [Function: RBAC],
  Base: [Function: Base],
  Role: [Function: Role],
  Permission: [Function: Permission],
  Storage: [Function: Storage],
  Memory: [Function: Memory] }

in doc you wrote var RBAC = require('rbac').default

Where is default key? var RBAC = require('rbac').default return undefined and bellow
RBAC is not a constructor

rustam87 avatar Nov 14 '19 09:11 rustam87

+1. Solution is to use the following:

const {RBAC} = require('rbac');

KasparTr avatar Dec 02 '19 11:12 KasparTr