From 06254667d6dfe310f9001d8f001476e36acfef27 Mon Sep 17 00:00:00 2001 From: anseki Date: Sun, 13 Jul 2014 20:45:56 +0900 Subject: [PATCH] small change README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index adda1ba..5a6db96 100644 --- a/README.md +++ b/README.md @@ -59,22 +59,23 @@ If `{noEchoBack: true}` is specified to `options`, echo back is avoided. It is u currentValue = readlineSync.setEncoding([encoding]) ``` -Set the encoding method of input (user's response) and output (`prompt`). Defaults to 'utf8'. +Set the encoding method of input (user's response) and output (`prompt` and `question`). Defaults to 'utf8'. ### setPrint ```js -readlineSync.setPrint(funcPrint) +readlineSync.setPrint([funcPrint]) ``` -The specified Function is called when any texts are outputed (`prompt` and `question`). Two arguments the text which is outputed and `encoding` are passed. Defaults to `undefined`. +The specified Function is called when any output (`prompt` and `question`). Defaults to `undefined`. +The Function is given two arguments the output text and `encoding`. ![sample](cl_01.png) -For example, this is used to pass plain texts to Logger, when prompt texts are colored. +For example, this is used to pass plain texts to Logger, when texts are colored. ```js -var readlineSync = require('readline-sync'); +var readlineSync = require('readline-sync'), user, pw, cmd; require('colors');