UNPKG

2.17 kBMarkdownView Raw
1# readlineSync
2
3## <a name="deprecated_methods_and_options"></a>Deprecated Methods and Options
4
5The readlineSync current version is fully compatible with older version.
6The following methods and options are deprecated.
7
8### <a name="deprecated_methods_and_options-setprint_method"></a>`setPrint` method
9
10Use the [`print`](README.md#basic_options-print) option.
11For the [Default Options](README.md#basic_options), use:
12
13```js
14readlineSync.setDefaultOptions({print: value});
15```
16
17instead of:
18
19```js
20readlineSync.setPrint(value);
21```
22
23### <a name="deprecated_methods_and_options-setprompt_method"></a>`setPrompt` method
24
25Use the [`prompt`](README.md#basic_options-prompt) option.
26For the [Default Options](README.md#basic_options), use:
27
28```js
29readlineSync.setDefaultOptions({prompt: value});
30```
31
32instead of:
33
34```js
35readlineSync.setPrompt(value);
36```
37
38### <a name="deprecated_methods_and_options-setencoding_method"></a>`setEncoding` method
39
40Use the [`encoding`](README.md#basic_options-encoding) option.
41For the [Default Options](README.md#basic_options), use:
42
43```js
44readlineSync.setDefaultOptions({encoding: value});
45```
46
47instead of:
48
49```js
50readlineSync.setEncoding(value);
51```
52
53### <a name="deprecated_methods_and_options-setmask_method"></a>`setMask` method
54
55Use the [`mask`](README.md#basic_options-mask) option.
56For the [Default Options](README.md#basic_options), use:
57
58```js
59readlineSync.setDefaultOptions({mask: value});
60```
61
62instead of:
63
64```js
65readlineSync.setMask(value);
66```
67
68### <a name="deprecated_methods_and_options-setbuffersize_method"></a>`setBufferSize` method
69
70Use the [`bufferSize`](README.md#basic_options-buffersize) option.
71For the [Default Options](README.md#basic_options), use:
72
73```js
74readlineSync.setDefaultOptions({bufferSize: value});
75```
76
77instead of:
78
79```js
80readlineSync.setBufferSize(value);
81```
82
83### <a name="deprecated_methods_and_options-noechoback_option"></a>`noEchoBack` option
84
85Use [`hideEchoBack`](README.md#basic_options-hideechoback) option instead of it.
86
87### <a name="deprecated_methods_and_options-notrim_option"></a>`noTrim` option
88
89Use [`keepWhitespace`](README.md#basic_options-keepwhitespace) option instead of it.