@atlaskit/adf-utils
Version:
Set of utilities to traverse, modify and create ADF documents.
16 lines (15 loc) • 517 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(function (mark) {
return 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 '".concat(type, "' already exists on a node: ").concat(JSON.stringify(node));
}