Browse Source

Documented repl.scope for explicitly exposing variables within the repl.

v0.7.4-release
simonw 15 years ago
committed by Ryan Dahl
parent
commit
516874f4a1
  1. 9
      doc/api.txt

9
doc/api.txt

@ -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

Loading…
Cancel
Save