(
json: JsonNode | JsonNode[],
{ compact, highlight = true, mapProps = defaultMapProps }: FormatElementOptions = {},
)
| 61 | } |
| 62 | |
| 63 | export function formatJson( |
| 64 | json: JsonNode | JsonNode[], |
| 65 | { compact, highlight = true, mapProps = defaultMapProps }: FormatElementOptions = {}, |
| 66 | ) { |
| 67 | return prettyFormat(json, { |
| 68 | plugins: [getElementJsonPlugin(mapProps), plugins.ReactElement], |
| 69 | highlight: highlight, |
| 70 | printBasicPrototype: false, |
| 71 | min: compact, |
| 72 | }); |
| 73 | } |
| 74 | |
| 75 | function getElementJsonPlugin(mapProps?: MapPropsFunction | null): NewPlugin { |
| 76 | return { |
no test coverage detected
searching dependent graphs…