MCPcopy Index your code
hub / github.com/epicweb-dev/advanced-react-patterns / exists

Function exists

epicshop/fix.js:101–109  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

99}
100
101function exists(p) {
102 if (!p) return false
103 try {
104 fs.statSync(p)
105 return true
106 } catch (error) {
107 return false
108 }
109}
110
111async function readDir(dir) {
112 if (exists(dir)) {

Callers 3

fix.jsFile · 0.85
updateTsconfigFunction · 0.85
readDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected