From 4e47b61d772e01701422ecf0377789734d2a83d3 Mon Sep 17 00:00:00 2001 From: Tejas Manohar Date: Mon, 16 Nov 2015 03:36:39 -0600 Subject: [PATCH] add docs for undocumented yet exposed readline functions --- doc/api/readline.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown index ac5c61fa1cc9cf..99c90079eb714f 100644 --- a/doc/api/readline.markdown +++ b/doc/api/readline.markdown @@ -308,6 +308,24 @@ a `"resize"` event on the `output` if/when the columns ever change Move cursor to the specified position in a given TTY stream. +## readline.emitKeypressEvents(stream) + +Accepts a readable Stream instance and makes it emit "keypress" events. + +## readline.getStringWidth(str) + +Returns the number of columns required to display the given string. + +## readline.isFullWidthCodePoint(code) + +Returns true if the character represented by a given Unicode code point is +full-width. Otherwise, returns false. + ## readline.moveCursor(stream, dx, dy) Move cursor relative to it's current position in a given TTY stream. + +## readline.stripVTControlCharacters(str) + +Tries to remove all VT control characters. Use to estimate displayed string +width. **May be buggy due to not running a real state machine.**