@cloud-copilot/iam-simulate
Version:
Simulate evaluation of AWS IAM policies
12 lines • 556 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGlobalConditionKeyWithOrWithoutPrefix = getGlobalConditionKeyWithOrWithoutPrefix;
const iam_data_1 = require("@cloud-copilot/iam-data");
function getGlobalConditionKeyWithOrWithoutPrefix(key) {
const slashIndex = key.indexOf('/');
if (slashIndex !== -1) {
return (0, iam_data_1.getGlobalConditionKeyByPrefix)(key.slice(0, slashIndex));
}
return (0, iam_data_1.getGlobalConditionKeyByName)(key);
}
//# sourceMappingURL=globalConditionKeys.js.map