How can I overwrite a module export value? Currently I have this:
temp.js
let lastrsss = '';
module.exports = {
lastrsss
};
I try overwrite the value with this:
const temprss = require('../../temp');
temprss.lastrsss = "https://something.com";
It works, but same time it doesn't. I think it saves in memory or I don't know. It doesn't save in temp.js. How can I do that it will save in temp.js?
temp.js, that's the point of modules. You could create a function intempused to set an internal variable, though.