MCPcopy Index your code
hub / github.com/pd4d10/hashmd / readFileSyncSafe

Function readFileSyncSafe

scripts/postinstall.mjs:8–14  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

6import path from 'path'
7
8function readFileSyncSafe(p) {
9 try {
10 return fs.readFileSync(p, 'utf8')
11 } catch (err) {
12 return ''
13 }
14}
15
16const plugins = packages.filter((x) => x.startsWith('plugin-'))
17

Callers 1

postinstall.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected