diff options
author | Prince J Wesley <princejohnwesley@gmail.com> | 2016-08-15 17:37:01 +0530 |
---|---|---|
committer | Prince J Wesley <princejohnwesley@gmail.com> | 2016-09-08 20:16:39 +0530 |
commit | a634554fca562e82d326967b809325f8ee5d3acd (patch) | |
tree | 89a25d97a47ae716f1129cf6703a28a92713a716 /doc/api/readline.md | |
parent | da0651ac1b4605851575ae3f179b00dde4ae41f5 (diff) | |
download | node-new-a634554fca562e82d326967b809325f8ee5d3acd.tar.gz |
readline: key interval delay for \r & \n
Emit two line events when there is a delay between
CR('\r') and LF('\n').
Introduced a new option `crlfDelay`. If the delay between \r and \n
exceeds `crlfDelay` milliseconds, both \r and \n will be treated as
separate end-of-line input. Default to 100 milliseconds.
`crlfDelay` will be coerced to [100, 2000] range.
PR-URL: https://github.com/nodejs/node/pull/8109
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Diffstat (limited to 'doc/api/readline.md')
-rw-r--r-- | doc/api/readline.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md index 2ffe08a31b..c9f8d88ac0 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -361,6 +361,10 @@ added: v0.1.98 only if `terminal` is set to `true` by the user or by an internal `output` check, otherwise the history caching mechanism is not initialized at all. * `prompt` - the prompt string to use. Default: `'> '` + * `crlfDelay` {number} If the delay between `\r` and `\n` exceeds + `crlfDelay` milliseconds, both `\r` and `\n` will be treated as separate + end-of-line input. Default to `100` milliseconds. + `crlfDelay` will be coerced to `[100, 2000]` range. The `readline.createInterface()` method creates a new `readline.Interface` instance. |