-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add in missing docs for exposed readline functions #3847
Conversation
44eb95d
to
4e47b61
Compare
@tejasmanohar would you please describe the commit log in detail?
|
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is meant to be public or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not.
@nodejs/ctc |
-1, These should really have been prefixed with an underscore since I am quite sure they are meant for internal use. |
## 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.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. not public XD
@Fishrock123 ... should we have a PR that prefixes them to underscored versions and deprecates the originals? |
Also -1 to documenting private features. |
Hm, why are they exported if they're private? |
@tejasmanohar ... as @Fishrock123 indicates, it's more an old naming error than anything else. These methods should have been prefixed with |
@jasnell I'll take care of it. Is it just these 4 methods that need it? |
@cjihrig I believe so. |
Closing in favor of #3862 |
This commit moves several of readline's undocumented functions into an internal module. Specifically, isFullWidthCodePoint, stripVTControlCharacters, getStringWidth, and emitKeys are moved to the internal module. The existing public exports of the first three functions are given a deprecation notice. Refs: #3847 Fixes: #3836 PR-URL: #3862 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
No description provided.