Skip to content

Instantly share code, notes, and snippets.

@r01010010
Last active August 29, 2015 14:12
Show Gist options
  • Save r01010010/4b1e3eeee586eb47c9a7 to your computer and use it in GitHub Desktop.
Save r01010010/4b1e3eeee586eb47c9a7 to your computer and use it in GitHub Desktop.
Require scopes
/** WHY IS THIS IN NODE.JS ? **/
// file1.js
var _ = require('underscore');
require('./routes/document'); // _ will be NOT VISIBLE in document
// file2.js
_ = require('underscore');
require('./routes/document'); // _ will be VISIBLE in document
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment