File-System GetContentOfFile Utillity Function

 

const fs = require('file-system');

 

const getContentOfFile = pathToFile => {

  return fs.readFileSync(pathToFile, 'utf-8', (err, data) => {

    if (err) throw err;

    return data;

  })

};

module.exports = getContentOfFile;

 

 

 

Nodejs-module-export

for-lang-loop

 

 


All Articles