MCPcopy
hub / github.com/vitejs/vite / isEmpty

Function isEmpty

packages/create-vite/src/index.ts:769–772  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

767}
768
769function isEmpty(path: string) {
770 const files = fs.readdirSync(path)
771 return files.length === 0 || (files.length === 1 && files[0] === '.git')
772}
773
774function emptyDir(dir: string) {
775 if (!fs.existsSync(dir)) {

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected