mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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.
This commit is contained in:
@@ -24,6 +24,9 @@ function cwdRequire (id) {
|
||||
}
|
||||
return require(id);
|
||||
}
|
||||
Object.keys(require).forEach(function (k) {
|
||||
cwdRequire[k] = require[k];
|
||||
});
|
||||
|
||||
function setScope (self) {
|
||||
scope = {};
|
||||
|
||||
Reference in New Issue
Block a user