MCPcopy Create free account
hub / github.com/epicweb-dev/react-suspense / writeIfNeeded

Function writeIfNeeded

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

Source from the content-addressed store, hash-verified

88}
89
90async function writeIfNeeded(filepath, content) {
91 const oldContent = await fs.promises.readFile(filepath, 'utf8')
92 if (oldContent !== content) {
93 await fs.promises.writeFile(filepath, content)
94 }
95 return oldContent !== content
96}
97
98function exists(p) {
99 if (!p) return false

Callers 2

updatePkgNamesFunction · 0.85
updateTsconfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected