MCPcopy Index your code
hub / github.com/shareAI-lab/Kode-CLI / readPackageJson

Function readPackageJson

cli.js:43–50  ·  view source on GitHub ↗
(packageRoot)

Source from the content-addressed store, hash-verified

41}
42
43function readPackageJson(packageRoot) {
44 try {
45 const p = path.join(packageRoot, 'package.json')
46 return JSON.parse(fs.readFileSync(p, 'utf8'))
47 } catch {
48 return null
49 }
50}
51
52function hasFlag(flag) {
53 return process.argv.includes(flag)

Callers 1

mainFunction · 0.70

Calls 2

joinMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected