src/lib/database.js
/**
 * Return the JSON content of the file at `path`, or null.
 */
Return the JSON content of the file at `path`, or null.
Return the JSON content of the file at ` path ` or null .
function readJSONFile(path) {
  try {
    return JSON.parse(fs.readFileSync(path));
  } catch (err) {
    if (err.code === 'ENOENT') {
      return null;
    } else {
      throw err;
    }
  }
}
function readJSONFile ( path ) { try { return JSON . parse ( fs . readFileSync ( path ) ) ; } catch ( err ) { if ( err . code === 'ENOENT' ) { return null ; } else { throw err ; } } }
Return the JSON content of the file at `path`, or null.
Return the JSON content of the file at ` path ` or null .
// file not found