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.
pull/5370/head
isaacs 2010-06-11 13:59:18 -07:00 committed by Ryan Dahl
parent 431e72cbe8
commit e65e6039a8
1 changed files with 3 additions and 0 deletions

View File

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