(filepath, content)
| 109 | } |
| 110 | |
| 111 | async function writeIfNeeded(filepath, content) { |
| 112 | const oldContent = await fs.promises.readFile(filepath, 'utf8') |
| 113 | if (oldContent !== content) { |
| 114 | await fs.promises.writeFile(filepath, content) |
| 115 | } |
| 116 | return oldContent !== content |
| 117 | } |
| 118 | |
| 119 | function exists(p) { |
| 120 | if (!p) return false |
no outgoing calls
no test coverage detected