(
tree: Element<*>,
params?: ConvertJSONParams = {},
)
| 107 | } |
| 108 | |
| 109 | export const convertToJSON = ( |
| 110 | tree: Element<*>, |
| 111 | params?: ConvertJSONParams = {}, |
| 112 | ): string => { |
| 113 | const { space, ...convertParams } = params |
| 114 | return JSON.stringify(convertToObject(tree, convertParams), null, space) |
| 115 | } |