Browse Source

Removed fileIO.js

pull/18/head
Peter Morgan 4 years ago
parent
commit
9258bfdf13
1 changed files with 0 additions and 32 deletions
  1. +0
    -32
      fileIO.js

+ 0
- 32
fileIO.js View File

@ -1,32 +0,0 @@
/** Used to read and write files from disk */
const fs = require('fs');
module.exports =
{
writeJSONToFile: function(fileName, jsonObject)
{
const json = JSON.stringify(jsonObject, null, 4);
fs.writeFile(fileName, json, 'utf8', function()
{
console.log("Wrote to " + fileName);
});
},
/**
*
* @param fileName
* @returns {any}
*/
getFileAsJSON: function(fileName)
{
return JSON.parse(module.exports.getFile(fileName));
},
getFile: function(filename)
{
return fs.readFileSync(filename, 'utf8');
}
};

Loading…
Cancel
Save