MCPcopy Create free account
hub / github.com/kentcdodds/kcd-scripts / hasFile

Function hasFile

src/utils.js:66–66  ·  view source on GitHub ↗
(...p)

Source from the content-addressed store, hash-verified

64const fromRoot = (...p) => path.join(appDirectory, ...p)
65const toPOSIX = p => p.split(path.sep).join(path.posix.sep)
66const hasFile = (...p) => fs.existsSync(fromRoot(...p))
67const ifFile = (files, t, f) =>
68 arrify(files).some(file => hasFile(file)) ? t : f
69

Callers 9

ifFileFunction · 0.85
utils.jsFile · 0.85
lint.jsFile · 0.85
typecheck.jsFile · 0.85
test.jsFile · 0.85
pre-commit.jsFile · 0.85
format.jsFile · 0.85
rollup.config.jsFile · 0.85
jest.config.jsFile · 0.85

Calls 1

fromRootFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…