MCPcopy Create free account
hub / github.com/porsager/postgres / empty

Function empty

transpile.cf.js:4–4  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import path from 'path'
3
4const empty = x => fs.readdirSync(x).forEach(f => fs.unlinkSync(path.join(x, f)))
5 , ensureEmpty = x => !fs.existsSync(x) ? fs.mkdirSync(x) : empty(x)
6 , root = 'cf'
7 , src = path.join(root, 'src')

Callers 1

ensureEmptyFunction · 0.70

Calls 1

forEachMethod · 0.65

Tested by

no test coverage detected