UNPKG

@rbac/rbac

Version:

Blazing Fast, Zero dependency, Hierarchical Role-Based Access Control for Node.js

19 lines (14 loc) 627 B
// CommonJS wrapper to provide direct access to RBAC function // This file ensures that require('@rbac/rbac') returns the function directly // while maintaining backward compatibility with require('@rbac/rbac').default const rbacModule = require('./index.js'); // Export the default as the main module.exports module.exports = rbacModule.default; // Also preserve all named exports Object.keys(rbacModule).forEach(key => { if (key !== 'default') { module.exports[key] = rbacModule[key]; } }); // Maintain backward compatibility: keep .default accessor module.exports.default = rbacModule.default;