import { Element } from "slate";
const isElementType = (element, type, suchThat) => {
  if (!Element.isElement(element) || element.type !== type) {
    return false;
  }
  if (suchThat === void 0) {
    return true;
  }
  for (const prop in suchThat) {
    const propValue = suchThat[prop];
    const propPresent = prop in element;
    if (!propValue && !propPresent) {
      continue;
    }
    if (!propPresent || element[prop] !== propValue) {
      return false;
    }
  }
  return true;
};
export {
  isElementType
};
//# sourceMappingURL=isElementType.js.map
