File-System GetContentOfFile Utillity Function

 

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

 

const getContentOfFile = pathToFile => {

  return fs.readFileSync(pathToFile'utf-8', (errdata=> {

    if (errthrow err;

    return data;

  })

};

module.exports = getContentOfFile;

 

 

 

Nodejs-module-export

for-lang-loop

 

 


All Articles