export function isValidUtility(utility) {
  if (!utility) {
    return false;
  }

  if (!utility.selector) {
    return false;
  }

  return true;
};

export function Utility(metadata) {
  if (!metadata.selector) {
    throw new Error('Utility needs to have a selector!');
  }

  return function (target) {
    target.selector = metadata.selector;
    target.isUtility = true;
  };
};
