src/helpers/MSFS/ConfigFiles/parseCFGFile.js
/**
 * Parse the chosen CFG file and return it
 *
 * @export
 * @return {Object} JSON object with the CFG file data
 */
Parse the chosen CFG file and return it
@export
@return {Object} JSON object with the CFG file data
Parse the chosen CFG file and return it @export @return { Object } JSON object with the CFG file data
function parseCFGFile() {
  if (!pathRegEx.test(CFGpath) || !fs.lstatSync(CFGpath).isFile()) ThrowError('E005', `Invalid path ${CFGpath}`);
  const data = ini.parse(fs.readFileSync(CFGpath, 'utf8'));
  return data;
}
function parseCFGFile ( ) { if ( ! pathRegEx . test ( CFGpath ) || ! fs . lstatSync ( CFGpath ) . isFile ( ) ) ThrowError ( 'E005' , ` ${ CFGpath } ` ) ; const data = ini . parse ( fs . readFileSync ( CFGpath , 'utf8' ) ) ; return data ; }
Parse the chosen CFG file and return it
 @export
 @return {Object} JSON object with the CFG file data
Parse the chosen CFG file and return it @export @return { Object } JSON object with the CFG file data