Fix: some sample codes
This commit is contained in:
parent
4097639ab7
commit
d7fa21e891
2 changed files with 6 additions and 5 deletions
|
@ -909,7 +909,7 @@ For example:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
argsArray = readlineSync.promptCL();
|
argsArray = readlineSync.promptCL();
|
||||||
console.log(argsArray.split('\n'));
|
console.log(argsArray.join('\n'));
|
||||||
```
|
```
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
@ -1230,8 +1230,8 @@ readlineSync.keyInYN('Really? :'); // Colon already exists
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
Do you like me? [y/n] :
|
Do you like me? [y/n] :y
|
||||||
Really? [y/n] :
|
Really? [y/n] :y
|
||||||
```
|
```
|
||||||
|
|
||||||
### `keyInYNStrict`
|
### `keyInYNStrict`
|
||||||
|
@ -1311,7 +1311,7 @@ If `true` is specified, a string `'(Hit any key)'` as guide for the user is adde
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
readlineSync.keyInYN('It\'s pausing now...');
|
readlineSync.keyInPause('It\'s pausing now...');
|
||||||
```
|
```
|
||||||
|
|
||||||
``` console
|
``` console
|
||||||
|
@ -1540,6 +1540,7 @@ while (true) {
|
||||||
Something :hello
|
Something :hello
|
||||||
-- You said "hello"
|
-- You said "hello"
|
||||||
Something or "!!" as "hello" :!!
|
Something or "!!" as "hello" :!!
|
||||||
|
hello
|
||||||
-- You said "hello"
|
-- You said "hello"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "readline-sync",
|
"name": "readline-sync",
|
||||||
"version": "1.2.10",
|
"version": "1.2.11",
|
||||||
"title": "readlineSync",
|
"title": "readlineSync",
|
||||||
"description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).",
|
"description": "Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
Loading…
Reference in a new issue