MCPcopy Create free account
hub / github.com/SocketCluster/socketcluster / parseJSONFile

Function parseJSONFile

bin/lib/index.js:38–46  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

36};
37
38let parseJSONFile = function (filePath) {
39 try {
40 if (fileExistsSync(filePath)) {
41 return JSON.parse(fs.readFileSync(filePath, { encoding: 'utf8' }));
42 }
43 } catch (e) {}
44
45 return {};
46};
47
48let parsePackageFile = function (moduleDir) {
49 let packageFile = path.join(moduleDir, 'package.json');

Callers 2

k8sDeployAndDeployUpdateFunction · 0.85
parsePackageFileFunction · 0.85

Calls 1

fileExistsSyncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…