UNPKG

@atlaskit/adf-schema

Version:

Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs

11 lines 304 B
export var toJSON = function toJSON(node) { return { // eslint-disable-next-line @typescript-eslint/no-explicit-any attrs: Object.keys(node.attrs).reduce(function (obj, key) { if (node.attrs[key] !== null) { obj[key] = node.attrs[key]; } return obj; }, {}) }; };