I’m trying to pull an entire module into the current scope of another file after a require call.
For instance if my module looks like this:
exports.chai = require "chai"
exports.mocha = require "mocha"
exports.Q = require "q"
How can I then access the individual variables like they are global variables in the current file? So instead of doing something like requireVar.chai I can just type chai?
Thanks for any advice
Using coffeescript, I recommend you use the destructuring assignment feature: