This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information...
1 parent 431e72c commit e65e6039a8310e2b110ea5b22be90e73a2eae84d @isaacs isaacs committed with ry Jun 11, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/repl.js
View
@@ -24,6 +24,9 @@ function cwdRequire (id) {
}
return require(id);
}
+Object.keys(require).forEach(function (k) {
+ cwdRequire[k] = require[k];
+});
function setScope (self) {
scope = {};

0 comments on commit e65e603

Please sign in to comment.