(filepath: string, content: JsonValue)
| 126 | * @param content - File contents |
| 127 | */ |
| 128 | export function writeFileString(filepath: string, content: JsonValue) { |
| 129 | const data: string = typeof content === 'string' ? content : JSON.stringify(content, undefined, 2); |
| 130 | return fs.writeFile(filepath, data, { |
| 131 | encoding: 'utf8', |
| 132 | }); |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * `which` with memoization |
no outgoing calls
no test coverage detected