import { Node } from "slate";
const hasMarks = (editor, marks, options = {}) => {
  const from = options.from ?? editor.selection?.anchor.path;
  const to = options.to ?? editor.selection?.focus.path;
  if (!from && !to) {
    return false;
  }
  for (const [text] of Node.texts(editor, {
    from,
    to
  })) {
    for (const markName in marks) {
      if (!(markName in text) || text[markName] !== marks[markName]) {
        return false;
      }
    }
  }
  return true;
};
export {
  hasMarks
};
//# sourceMappingURL=hasMarks.js.map
