Function
serialize
(
val: unknown,
indent = 2,
formatOverrides: PrettyFormatOptions = {},
)
Source from the content-addressed store, hash-verified
| 57 | const printFunctionName = false; |
| 58 | |
| 59 | export const serialize = ( |
| 60 | val: unknown, |
| 61 | indent = 2, |
| 62 | formatOverrides: PrettyFormatOptions = {}, |
| 63 | ): string => |
| 64 | normalizeNewlines( |
| 65 | prettyFormat(val, { |
| 66 | escapeRegex, |
| 67 | indent, |
| 68 | plugins: getSerializers(), |
| 69 | printFunctionName, |
| 70 | ...formatOverrides, |
| 71 | }), |
| 72 | ); |
| 73 | |
| 74 | export const minify = (val: unknown): string => |
| 75 | prettyFormat(val, { |