* Gets the parsed contents of a json file
(filePath, fileName, encoding = 'utf8')
| 12 | * Gets the parsed contents of a json file |
| 13 | */ |
| 14 | function getParsedJsonFromFile (filePath, fileName, encoding = 'utf8') { |
| 15 | try { |
| 16 | var packageJsonContents = fs.readFileSync(path.join(filePath, fileName), encoding); |
| 17 | return JSON.parse(packageJsonContents); |
| 18 | } catch (e) { |
| 19 | console.error(e); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * A helper method for getting the contents of package.json at a given path |
no outgoing calls
no test coverage detected