I have readmsgfile.js file which has module.exports and fs.readFile function in it which reads a File and return the data after some operation.
I would like to return the msgBody from readmsgfile class but the Caller Class A always gets "Undefined" in the line code var respondMsg. I tried to return the value out side of fs.readfile scope but did not work.
what modifications has to be done to get the msgBody var value from readmsgfile file to caller Class A
readmsgfile.js
--------------------
const fs = require("fs");
var msgBody;
module.exports = {
readMSGFile: async function (filepath) {
let path = filepath;
var regex = /\\/g;
const pathOfString = path.replace(regex, "/");
fs.readFile(pathOfString, function (err, data) {
var msgBody = Sum Operation Done! ;
return msgBody;
});
return msgBody;
},
};
Class A:
--------------------------
const readFile = require("../readmsgfile");
Async function(){
var respondMsg = await readFile.readMSGFile(detailsoffile);
console.log(respondMsg);
}
modafinil reviews – buy modafinil online provigil weight loss
order cheap accutane – accutane online india accutane 40 mg online
buy amoxicillina 500 mg from mexico – buy amoxicillin 500 mg amoxicillin for humans for sale
buy brand vardenafil – vardenafil generic levitra buy generic vardenafil online
stromectol in canada – buy stromectol uk cost of ivermectin 1% cream
cialis for daily use price – cost of generic cialis in canada buy tadalafil cialis
stromectol price in india – generic ivermectin cream ivermectin dosage
how to get accutane without prescription – accutane 80 mg daily average price of accutane
price of lyrica in canada – canadian pharmacy world coupons legit canadian pharmacy
buy amoxicilin noscript canada – buy amoxicilin 500 mg mexico buy amoxicilina noscript canada
viagra for sale online australia – sildenafil 25 mg online viagra 500mg
cialis tablet price in india – mail pharmacy price for tadalafil 10mg
purchase ivermectin – stromectol tablets for humans for sale ivermectin dose for covid
prednisone 2.5 mg – prednisone 1mg purchase order prednisone online safely
modafinil and caffeine – modafinil 100mg provigil a narcotic
zithromax pfizer – z pack purchase zithromax
furosemide cost in india – can you buy lasix in mexico without a prescription furosemide 4 mg
where can i buy clomiphene – clomid bodybuilding order clomid
buy sildenafil 100mg uk – buy viagra online fast shipping order sildenafil 20 mg
cialis 20 mg online pharmacy – cialis on line purchase cheap cialis with prescription
ivermectin 50mg/ml – covid ivermectin order stromectol online
jackpot party casino – empire city casino online sugarhouse casino online
erectile dysfunction doctors near me – erectile dysfunction medicines best non prescription ed pills
price of prednisone 50 mg – buy prednisone online fast shipping prednisone tablets 5mg price
buy viagra in europe – generic viagra sales 150 mg viagra online
tadalafil 80mg – Cialis overnight shipping tadalafil 40 mg uk
stromectol over the counter – buy ivermectin cost of ivermectin medicine
best erectile dysfunction pills – best ed pills hims ed pills
vardenafil commercial – buy generic vardenafil uk when to take vardenafil
furosemide over the counter furosemide generic nek nox
lasix medicine price lasix 20 mg tablet nek nox
ventolin purchase – ventolin 100 mcg buy Albuterol
sildenafil cheap – sildenafil for women sildenafil online generic
clomid online nek nox
viagra order online – purchasing viagra on the internet sildenafil gel 100 mg
accutane prices in south africa – buy 40mg accutane online isotretinoin 5 mg
ivermectin generic – ivermectin medicine stromectol tab price
hard rock casino online – slotgmvegas online casino games for real money
write me a paper – write research paper help me with my essay
buy hydroxychloroquine pill – order cenforce 100mg buy valtrex 500mg for sale
purchase sildalis generic – sildalis online buy buy metformin 1000mg online
buy ampicillin 500mg without prescription – buy acillin generic plaquenil 200mg drug
buy plaquenil 400mg online cheap – order generic plaquenil order hydroxychloroquine 200mg online
cost of viagra 100mg – sildenafil 25mg cialis 5mg for sale
viagra 25mg en ligne – sildenafil 100mg en ligne generique tadalafil 20mg
best price usa tadalafil tadalafil online with out prescription
buy prednisone 10mg sale – canadian pharmaceuticals online buy prednisone 10mg pill
tadalafil liquid tadalafil liquid
buy isotretinoin 20mg online – buy amoxil 1000mg for sale order amoxicillin 1000mg generic
tadalafil online with out prescription cialis without prescription
purchase tizanidine sale – prozac order colchicine uk
buy inderal for sale – plaquenil 400mg pill buy hydroxychloroquine 200mg sale
where to buy cialis without prescription what is tadalafil
cheap generic cialis for sale tadalafil price walmart
side effects for tadalafil tadalafil brands
tadalafil brands buy tadalafil
tadalafil generic where to order tadalafil tablets
side effects for tadalafil https://cialisicp.com/
lowest price cialis tadalafil liquid
order modafinil 200mg for sale buy modafinil
generic ivermectin 6 mg stromectol tablets price of stromectol absolute accuracy
https://www.ivermectinusd.com/ online pharmacy stromectol