@atlaskit/adf-utils
Version:
Set of utilities to traverse, modify and create ADF documents.
14 lines (13 loc) • 475 B
JavaScript
// Ignored via go/ees005
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function isDuplicateMark(node, type) {
if (node.marks && node.marks.some(mark => mark.type === type)) {
return true;
}
return false;
}
// Ignored via go/ees005
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function duplicateMarkError(node, type) {
return `Mark with the same name '${type}' already exists on a node: ${JSON.stringify(node)}`;
}