import { matchFeature } from "../lib/auth/featureMatch.js";
import { matchFeature as matchFeature2 } from "../lib/auth/featureMatch.js";
function hasFeature(granted, required) {
  if (!Array.isArray(granted) || !granted.length) return false;
  return granted.some((feature) => matchFeature2(required, feature));
}
function hasAllFeatures(granted, required) {
  if (!required || required.length === 0) return true;
  if (!Array.isArray(granted) || !granted.length) return false;
  return required.every((feature) => hasFeature(granted, feature));
}
export {
  hasAllFeatures,
  hasFeature,
  matchFeature
};
//# sourceMappingURL=features.js.map
