79
rated 0 times
[
86]
[
7]
/ answers: 1 / hits: 78374
/ 12 Years ago, tue, september 18, 2012, 12:00:00
Say I have one .js
file containing a javascript object. I want to be able to access that object and all of its functionality from another .js
file in the same directory. Can I simply export this object with the module.exports
object and require()
it in the other .js
file? If this is possible can you give me an example?
If it helps I'm developing with node.
More From » oop