Skip to content

Commit

Permalink
Documented repl.scope for explicitly exposing variables within the repl.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw authored and ry committed Nov 27, 2009
1 parent 4129305 commit 516874f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doc/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1432,8 +1432,13 @@ tcp.createServer(function (c) {
}).listen(5000);
repl.start("simple tcp server> ");
------------------------------------


The repl provides access to any variables in the global scope. You can expose a variable
to the repl explicitly by assigning it to the +repl.scope+ object:
------------------------------------
var count = 5;
repl.start();
repl.scope.count = count;
------------------------------------

== Addons

Expand Down

0 comments on commit 516874f

Please sign in to comment.