Skip to content

Commit 4e47b61

Browse files
committed
add docs for undocumented yet exposed readline functions
1 parent 84f0964 commit 4e47b61

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/api/readline.markdown

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,24 @@ a `"resize"` event on the `output` if/when the columns ever change
308308

309309
Move cursor to the specified position in a given TTY stream.
310310

311+
## readline.emitKeypressEvents(stream)
312+
313+
Accepts a readable Stream instance and makes it emit "keypress" events.
314+
315+
## readline.getStringWidth(str)
316+
317+
Returns the number of columns required to display the given string.
318+
319+
## readline.isFullWidthCodePoint(code)
320+
321+
Returns true if the character represented by a given Unicode code point is
322+
full-width. Otherwise, returns false.
323+
311324
## readline.moveCursor(stream, dx, dy)
312325

313326
Move cursor relative to it's current position in a given TTY stream.
327+
328+
## readline.stripVTControlCharacters(str)
329+
330+
Tries to remove all VT control characters. Use to estimate displayed string
331+
width. **May be buggy due to not running a real state machine.**

0 commit comments

Comments
 (0)