Skip to content

Instantly share code, notes, and snippets.

@nagyv
Created February 11, 2012 14:07
Show Gist options
  • Save nagyv/1799561 to your computer and use it in GitHub Desktop.
Save nagyv/1799561 to your computer and use it in GitHub Desktop.
Module definition with Node.JS
(function() {
// Save a reference to the global object.
var root = this;
/* do stuff */
root.public_method = function() {};
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment