Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
2
import
path from
'path'
3
4
const
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
ensureEmpty
Function · 0.70
Calls
1
forEach
Method · 0.65
Tested by
no test coverage detected