( value: unknown, path: string, spaces = 2 )
| 131 | } |
| 132 | |
| 133 | export function stringifyJsonFileContent( |
| 134 | value: unknown, |
| 135 | path: string, |
| 136 | spaces = 2 |
| 137 | ): string { |
| 138 | const serialized = JSON.stringify(value, null, spaces); |
| 139 | if (serialized === undefined) { |
| 140 | throw new Error(`Unable to serialize JSON for ${path}`); |
| 141 | } |
| 142 | return serialized + "\n"; |
| 143 | } |
| 144 | |
| 145 | export function searchTextContent( |
| 146 | content: string, |
no outgoing calls
no test coverage detected