From 0e2b206e5188c338b72367432886a6f221630e5d Mon Sep 17 00:00:00 2001 From: anseki Date: Sun, 10 Aug 2014 18:16:08 +0900 Subject: [PATCH] small change README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b440a7..df7096e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # readlineSync Synchronous [Readline](http://nodejs.org/api/readline.html) for interactively running. -The interface is used with process.stdin and process.stdout in order to accept user input. +The interface is used with `process.stdin` and `process.stdout` in order to accept user input. ## Example @@ -27,11 +27,13 @@ currentValue = readlineSync.setPrompt([prompt]) Sets the prompt, for example when you run `node` on the command line, you see `> `, which is node's prompt. `prompt` may be string, or may not be (e.g. number, Date, Object, etc.). This is converted to string (i.e. `toString` method is called) before it is displayed every time. -For example: `[foo-directory]# ` like bash +For example: `[foo-directory]#` like a bash ```js -readlineSync.setPrompt({toString: - function() { return '[' + require('path').basename(process.cwd()) + ']# '; }}) +// Object that has toString method. +readlineSync.setPrompt({toString: function() { + return '[' + require('path').basename(process.cwd()) + ']# '; +}}) ``` ### prompt