MCPcopy
hub / github.com/stackblitz-labs/pkg.pr.new / tryReadFile

Function tryReadFile

packages/cli/index.ts:974–980  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

972}
973
974async function tryReadFile(p: string) {
975 try {
976 return await fs.readFile(p, "utf8");
977 } catch {
978 return null;
979 }
980}
981
982async function readPackageJson(p: string) {
983 const contents = await tryReadFile(p);

Callers 2

index.tsFile · 0.85
readPackageJsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected