Browse Source

Fix #169. Expose require members in the repl.

This fixes #169 by putting the require members onto the cwdRequire function
which is exposed to the repl scope.
v0.7.4-release
isaacs 15 years ago
committed by Ryan Dahl
parent
commit
e65e6039a8
  1. 3
      lib/repl.js

3
lib/repl.js

@ -24,6 +24,9 @@ function cwdRequire (id) {
}
return require(id);
}
Object.keys(require).forEach(function (k) {
cwdRequire[k] = require[k];
});
function setScope (self) {
scope = {};

Loading…
Cancel
Save