UNPKG

permissions.js

Version:

This module is a manager for permissions. With this module you can defined and host the permissions of user as a integer which makes it possible to limit the use of memory.

17 lines (16 loc) 422 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BasePermissions = void 0; class BasePermissions { constructor(permissions) { this.permissions = permissions; } get ALL() { let bit = 0; for (let flag of this.permissions) { bit += flag.value; } return bit; } } exports.BasePermissions = BasePermissions;