MCPcopy Create free account
hub / github.com/epicweb-dev/full-stack-foundations / writeIfNeeded

Function writeIfNeeded

epicshop/fix.js:96–102  ·  view source on GitHub ↗
(filepath, content)

Source from the content-addressed store, hash-verified

94}
95
96async function writeIfNeeded(filepath, content) {
97 const oldContent = await fs.promises.readFile(filepath, 'utf8')
98 if (oldContent !== content) {
99 await fs.promises.writeFile(filepath, content)
100 }
101 return oldContent !== content
102}
103
104async function updateDataDb() {
105 let latestPrismaApp

Callers 2

updatePkgNamesFunction · 0.85
updateTsconfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected