Fix: some sample codes

This commit is contained in:
anseki 2015-04-24 19:49:30 +09:00
parent 557a067c9f
commit 5b33a7679c
2 changed files with 4 additions and 3 deletions

View file

@ -285,7 +285,7 @@ file = readlineSync.question('Text File :', {limit: /\.txt$/i});
```js
ip = readlineSync.question('IP Address :', {limit: function(input) {
return require('net').isIP(input) !== '0'; // Valid IP Address
return require('net').isIP(input); // Valid IP Address
}});
```
@ -515,6 +515,7 @@ while (true) {
> hello
-- You said "hello"
> !!
hello
-- You said "hello"
> !!:p
hello
@ -583,7 +584,7 @@ console.log('-- E-mail is ' + email);
```
```console
Input e-mail address :a@b
Input e-mail address :abc
Input valid e-mail address, please.
Input e-mail address :mail@example.com
-- E-mail is mail@example.com

View file

@ -1,6 +1,6 @@
{
"name": "readline-sync",
"version": "1.2.8",
"version": "1.2.9",
"title": "readlineSync",
"description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).",
"keywords": [