All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.utils.permissions.js Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.hasPermission = exports.hasAnyPermission = exports.hasAllPermissions = void 0;
var hasPermission = function hasPermission(permission) {
  return globalProps.permissions.includes(permission);
};
exports.hasPermission = hasPermission;
var hasAnyPermission = function hasAnyPermission() {
  for (var _len = arguments.length, permissions = new Array(_len), _key = 0; _key < _len; _key++) {
    permissions[_key] = arguments[_key];
  }
  return permissions.some(hasPermission);
};
exports.hasAnyPermission = hasAnyPermission;
var hasAllPermissions = function hasAllPermissions() {
  for (var _len2 = arguments.length, permissions = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    permissions[_key2] = arguments[_key2];
  }
  return permissions.every(hasPermission);
};
exports.hasAllPermissions = hasAllPermissions;
//# sourceMappingURL=permissions.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy