@dereekb/model 13.7.0 → 13.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -970,22 +970,14 @@ var GrantedRoleMapReaderInstance = /*#__PURE__*/ function() {
970
970
  {
971
971
  key: "hasRoles",
972
972
  value: function hasRoles(setIncludes, inputRoles) {
973
- if (this._map[FULL_ACCESS_ROLE_KEY]) {
974
- return true;
975
- } else {
976
- return this.containsRoles(setIncludes, inputRoles);
977
- }
973
+ return this._map[FULL_ACCESS_ROLE_KEY] ? true : this.containsRoles(setIncludes, inputRoles);
978
974
  }
979
975
  },
980
976
  {
981
977
  key: "containsRoles",
982
978
  value: function containsRoles(setIncludes, inputRoles) {
983
979
  var roles = util.iterableToArray(inputRoles);
984
- if (setIncludes === 'any') {
985
- return this.containsAnyRole(roles);
986
- } else {
987
- return this.containsEachRole(roles);
988
- }
980
+ return setIncludes === 'any' ? this.containsAnyRole(roles) : this.containsEachRole(roles);
989
981
  }
990
982
  },
991
983
  {
package/index.esm.js CHANGED
@@ -968,22 +968,14 @@ var GrantedRoleMapReaderInstance = /*#__PURE__*/ function() {
968
968
  {
969
969
  key: "hasRoles",
970
970
  value: function hasRoles(setIncludes, inputRoles) {
971
- if (this._map[FULL_ACCESS_ROLE_KEY]) {
972
- return true;
973
- } else {
974
- return this.containsRoles(setIncludes, inputRoles);
975
- }
971
+ return this._map[FULL_ACCESS_ROLE_KEY] ? true : this.containsRoles(setIncludes, inputRoles);
976
972
  }
977
973
  },
978
974
  {
979
975
  key: "containsRoles",
980
976
  value: function containsRoles(setIncludes, inputRoles) {
981
977
  var roles = iterableToArray(inputRoles);
982
- if (setIncludes === 'any') {
983
- return this.containsAnyRole(roles);
984
- } else {
985
- return this.containsEachRole(roles);
986
- }
978
+ return setIncludes === 'any' ? this.containsAnyRole(roles) : this.containsEachRole(roles);
987
979
  }
988
980
  },
989
981
  {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dereekb/model",
3
- "version": "13.7.0",
3
+ "version": "13.8.0",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.7.0",
5
+ "@dereekb/util": "13.8.0",
6
6
  "arktype": "^2.2.0",
7
7
  "make-error": "^1.3.0"
8
8
  },