View gist:702856
// in foo.js: | |
module['exports'] = function() { | |
console.log('foo'); | |
} | |
// in your repl: | |
node> foo = require('./foo'); | |
[Function] | |
node> foo() | |
foo |