Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@frontegg/entitlements-javascript-commons

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontegg/entitlements-javascript-commons - npm Package Compare versions

Comparing version 1.0.0-alpha.16 to 1.0.0-alpha.17

2

dist/index.d.ts

@@ -5,2 +5,2 @@ export { FeatureFlagEvaluationResult, FeatureFlag, evaluateFeatureFlag } from './feature-flags';

export { OperationEnum, ConditionValue } from './operations/types';
export { evaluateIsEntitledToFeature, evaluateIsEntitledToPermissions, prepareAttributes, checkPermission, Permissions, JwtAttributes, CustomAttributes, FronteggAttributes, NotEntitledJustification, UserEntitlementsContext, EntitlementResult, Attributes, } from './user-entitlements';
export { evaluateIsEntitledToFeature, evaluateIsEntitledToPermissions, prepareAttributes, checkPermission, createPermissionCheckRegex, Permissions, JwtAttributes, CustomAttributes, FronteggAttributes, NotEntitledJustification, UserEntitlementsContext, EntitlementResult, Attributes, } from './user-entitlements';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NotEntitledJustification = exports.checkPermission = exports.prepareAttributes = exports.evaluateIsEntitledToPermissions = exports.evaluateIsEntitledToFeature = exports.OperationEnum = exports.TreatmentEnum = exports.evaluateFeatureFlag = void 0;
exports.NotEntitledJustification = exports.createPermissionCheckRegex = exports.checkPermission = exports.prepareAttributes = exports.evaluateIsEntitledToPermissions = exports.evaluateIsEntitledToFeature = exports.OperationEnum = exports.TreatmentEnum = exports.evaluateFeatureFlag = void 0;
var feature_flags_1 = require("./feature-flags");

@@ -15,3 +15,4 @@ Object.defineProperty(exports, "evaluateFeatureFlag", { enumerable: true, get: function () { return feature_flags_1.evaluateFeatureFlag; } });

Object.defineProperty(exports, "checkPermission", { enumerable: true, get: function () { return user_entitlements_1.checkPermission; } });
Object.defineProperty(exports, "createPermissionCheckRegex", { enumerable: true, get: function () { return user_entitlements_1.createPermissionCheckRegex; } });
Object.defineProperty(exports, "NotEntitledJustification", { enumerable: true, get: function () { return user_entitlements_1.NotEntitledJustification; } });
//# sourceMappingURL=index.js.map
import { Permissions } from './types';
export declare function checkPermission(permissions: Permissions, requiredPermission: string): boolean;
export declare function createPermissionCheckRegex(permissionKey: string): RegExp;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkPermission = void 0;
exports.createPermissionCheckRegex = exports.checkPermission = void 0;
function checkPermission(permissions, requiredPermission) {

@@ -11,2 +11,3 @@ return Object.keys(permissions).some((permissionKey) => createPermissionCheckRegex(permissionKey).test(requiredPermission));

}
exports.createPermissionCheckRegex = createPermissionCheckRegex;
//# sourceMappingURL=permissions.utils.js.map

@@ -0,1 +1,8 @@

# [1.0.0-alpha.17](https://github.com/frontegg/entitlements-javascript-commons/compare/v-1.0.0-alpha.16...v-1.0.0-alpha.17) (2023-10-30)
### Bug Fixes
* **user-entitlements:** exported utility function ([4d81b3e](https://github.com/frontegg/entitlements-javascript-commons/commit/4d81b3e04b1de59047c6b5911f09391a4ccafcb9))
# [1.0.0-alpha.16](https://github.com/frontegg/entitlements-javascript-commons/compare/v-1.0.0-alpha.15...v-1.0.0-alpha.16) (2023-10-30)

@@ -2,0 +9,0 @@

{
"name": "@frontegg/entitlements-javascript-commons",
"version": "1.0.0-alpha.16",
"version": "1.0.0-alpha.17",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -10,2 +10,3 @@ export { FeatureFlagEvaluationResult, FeatureFlag, evaluateFeatureFlag } from './feature-flags';

checkPermission,
createPermissionCheckRegex,
Permissions,

@@ -12,0 +13,0 @@ JwtAttributes,

@@ -8,4 +8,4 @@ import { Permissions } from './types';

function createPermissionCheckRegex(permissionKey: string): RegExp {
export function createPermissionCheckRegex(permissionKey: string): RegExp {
return new RegExp('^' + permissionKey.replace(/\./g, '\\.').replace(/\*/g, '.*') + '$', 'gs');
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc