(filepath, content)
| 91 | } |
| 92 | |
| 93 | async function writeIfNeeded(filepath, content) { |
| 94 | const oldContent = await fs.promises.readFile(filepath, 'utf8') |
| 95 | if (oldContent !== content) { |
| 96 | await fs.promises.writeFile(filepath, content) |
| 97 | } |
| 98 | return oldContent !== content |
| 99 | } |
| 100 | |
| 101 | function exists(p) { |
| 102 | if (!p) return false |
no outgoing calls
no test coverage detected