UNPKG

@cloud-copilot/iam-policy

Version:
34 lines 990 B
import { ConditionOperationImpl } from './conditionOperation.js'; export class ConditionImpl { constructor(op, key, values, otherProps) { this.op = op; this.key = key; this.values = values; this.otherProps = otherProps; } operation() { return new ConditionOperationImpl(this.op); } conditionKey() { return this.key; } conditionValues() { return typeof this.values === 'string' ? [this.values] : this.values; } valueIsArray() { return Array.isArray(this.values); } operatorKeyPath() { return `${this.otherProps.conditionPath}.#${this.op}`; } operatorValuePath() { return `${this.otherProps.conditionPath}.${this.op}`; } keyPath() { return `${this.otherProps.conditionPath}.${this.op}.#${this.key}`; } valuesPath() { return `${this.otherProps.conditionPath}.${this.op}.${this.key}`; } } //# sourceMappingURL=condition.js.map