MCPcopy Index your code
hub / github.com/ternjs/tern / readJSON

Function readJSON

lib/bootstrap.js:32–40  ·  view source on GitHub ↗
(fileName)

Source from the content-addressed store, hash-verified

30 defaultConfig = readProjectFile(path.resolve(homeDir, ".tern-config"));
31
32function readJSON(fileName) {
33 var file = fs.readFileSync(fileName, "utf8");
34 try {
35 return JSON.parse(file);
36 } catch (e) {
37 console.error("Bad JSON in " + fileName + ": " + e.message);
38 process.exit(1);
39 }
40}
41
42function readProjectFile(fileName) {
43 var data = readJSON(fileName), name;

Callers 2

readProjectFileFunction · 0.85
findDefsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…