Simple example:
file1
module.exports.foo = function(obj) {
module.exports.obj = obj;
}
file2
file1 = require("file1")
var something = {a: "a"};
file1.foo(something); //export "something" being a part of file2
The example above is not working.
What I want is basically a module.exports helper, since I plan a few helpers for whole object “exportion”.
Thank you
moduleinfile1.jsis a different instance from that infile2.js.file1.js
file2.js
console:
idreturned are differentUpdate
alternatively, why not update file2.js to extend its
module.exportsFile2.js
File3.js