Update README

This commit is contained in:
anseki 2015-06-11 15:46:05 +09:00
parent b067a0ba78
commit 4b9a9d2c9b
6 changed files with 11 additions and 10 deletions

View file

@ -8,7 +8,7 @@ readlineSync tries to let your script have a conversation with the user via a co
<tr><td><a href="#basic_options">Basic Options</a></td><td><a href="#utility_methods">Utility Methods</a></td><td><a href="#placeholders">Placeholders</a></td></tr>
</table>
* Some simple cases:
* Simple case:
```js
var readlineSync = require('readline-sync');
@ -31,7 +31,7 @@ What is your favorite food? :****
Oh, CookieMonster loves tofu!
```
* Enter key is not necessary:
* Get user's response without Enter key:
```js
var readlineSync = require('readline-sync');
@ -85,12 +85,7 @@ while (true) {
console.log('\nA value the user requested: ' + value);
```
```console
[Z] <- -> [X] FIX: [SPACE]
|---------------------------------------------------O---------| 51
A value the user requested: 51
```
![sample](screen_03.gif)
## <a name="installation"></a>Installation
@ -216,6 +211,12 @@ readlineSync.setDefaultOptions({
});
```
```console
[13148kb]$ foo
[13160kb]$ bar
[13200kb]$
```
### <a name="basic_options-hideechoback"></a>`hideEchoBack`
*Type:* boolean
@ -252,7 +253,7 @@ secret = readlineSync.question('Please whisper sweet words :', {
});
```
![sample](cl_02.png)
![sample](screen_02.gif)
### <a name="basic_options-limit"></a>`limit`
@ -428,7 +429,7 @@ For example:
* Pass the plain texts to the Logger (e.g. [log4js](https://github.com/nomiddlename/log4js-node)), after clean the colored texts.
![sample](cl_01.png)
![sample](screen_01.png)
```js
var readlineSync = require('readline-sync'),

BIN
cl_01.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

BIN
cl_02.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
screen_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

BIN
screen_02.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
screen_03.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB