From 2e1ebbf2c54585e67ec71d73b8a7f94214077368 Mon Sep 17 00:00:00 2001 From: Dan Kohn Date: Tue, 12 Feb 2013 15:04:23 -0500 Subject: [PATCH] doc: add prompt to fix repl_test.js example MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Running repl.start without the prompt set produces this error: repl.js:95     throw new Error('An options Object, or a prompt String are required');           ^ Error: An options Object, or a prompt String are required     at new REPLServer (repl.js:95:11)     at Object.exports.start (repl.js:321:14)     at Object. (/Users/dan/Dropbox/Documents/dev/nextgen/repl_test.js:5:6)     at Module._compile (module.js:449:26)     at Object.Module._extensions..js (module.js:467:10)     at Module.load (module.js:356:32)     at Function.Module._load (module.js:312:12)     at Module.runMain (module.js:492:10)     at process.startup.processNextTick.process._tickCallback (node.js:244:9) --- doc/api/repl.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index 2104136..557ae17 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -159,7 +159,7 @@ associated with each `REPLServer`. For example: var repl = require("repl"), msg = "message"; - repl.start().context.m = msg; + repl.start("> ").context.m = msg; Things in the `context` object appear as local within the REPL: -- 2.7.4