Skip to content

Instantly share code, notes, and snippets.

@jhnns
Last active October 23, 2018 04:04
Show Gist options
  • Save jhnns/f7292b4700fc6cdbe35de9984e420d03 to your computer and use it in GitHub Desktop.
Save jhnns/f7292b4700fc6cdbe35de9984e420d03 to your computer and use it in GitHub Desktop.
Node function wrapper
const module = {
exports: {}
};
const require = makeRequireFunction();
const filename = "...";
const dirname = "...";
(function (exports, require, module, __filename, __dirname) {
/* YOUR CODE */
})(module.exports, require, module, filename, dirname);
@MeetPatel5
Copy link

MeetPatel5 commented Oct 23, 2018

if i have 10 modules then , is that means 10 times this IIFE will run ? or something else will happen ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment