README-Deprecated.md 2.12 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
# readlineSync

## <a name="deprecated_methods_and_options"></a>Deprecated Methods and Options

The readlineSync current version is fully compatible with older version.  
The following methods and options are deprecated.

### <a name="deprecated_methods_and_options-setprint_method"></a>`setPrint` method

Use the [`print`](README.md#basic_options-print) option.  
For the [Default Options](README.md#basic_options), use:

```js
readlineSync.setDefaultOptions({print: value});
```

instead of:

```js
readlineSync.setPrint(value);
```

### <a name="deprecated_methods_and_options-setprompt_method"></a>`setPrompt` method

Use the [`prompt`](README.md#basic_options-prompt) option.  
For the [Default Options](README.md#basic_options), use:

```js
readlineSync.setDefaultOptions({prompt: value});
```

instead of:

```js
readlineSync.setPrompt(value);
```

### <a name="deprecated_methods_and_options-setencoding_method"></a>`setEncoding` method

Use the [`encoding`](README.md#basic_options-encoding) option.  
For the [Default Options](README.md#basic_options), use:

```js
readlineSync.setDefaultOptions({encoding: value});
```

instead of:

```js
readlineSync.setEncoding(value);
```

### <a name="deprecated_methods_and_options-setmask_method"></a>`setMask` method

Use the [`mask`](README.md#basic_options-mask) option.  
For the [Default Options](README.md#basic_options), use:

```js
readlineSync.setDefaultOptions({mask: value});
```

instead of:

```js
readlineSync.setMask(value);
```

### <a name="deprecated_methods_and_options-setbuffersize_method"></a>`setBufferSize` method

Use the [`bufferSize`](README.md#basic_options-buffersize) option.  
For the [Default Options](README.md#basic_options), use:

```js
readlineSync.setDefaultOptions({bufferSize: value});
```

instead of:

```js
readlineSync.setBufferSize(value);
```

### <a name="deprecated_methods_and_options-noechoback_option"></a>`noEchoBack` option

Use [`hideEchoBack`](README.md#basic_options-hideechoback) option instead of it.

### <a name="deprecated_methods_and_options-notrim_option"></a>`noTrim` option

Use [`keepWhitespace`](README.md#basic_options-keepwhitespace) option instead of it.