Skip to content

doc: small improvements in readline code examples #9628

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 2 commits into from
Closed

doc: small improvements in readline code examples #9628

wants to merge 2 commits into from

Conversation

vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt commented Nov 16, 2016

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change
  1. Consistent template literals in console.log().

  2. === instead of ==.

  3. const instead of var.


I am not sure about these two fragments:

  1. In the Use of the completer Function

      var hits = completions.filter((c) => { return c.indexOf(line) == 0 });

    a. Should it be (c) => c.indexOf(line) == 0 or is this a case of no-confusing-arrow eslint rule?
    b. Should a semicolon be added after 0 if the current variant remains?

  2. In the readline.emitKeypressEvents(stream[, interface])

    if (process.stdin.isTTY)
      process.stdin.setRawMode(true);

    Should it be in one line (like the similar fragment in the Event: 'SIGINT')?

If these ones should be somehow addressed, please, let me know.

1. Consistent template literals in `console.log()`.

2. === instead of ==.
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. readline Issues and PRs related to the built-in readline module. labels Nov 16, 2016
@JacksonTian
Copy link
Contributor

LGTM

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@targos targos self-assigned this Nov 19, 2016
targos pushed a commit to targos/node that referenced this pull request Nov 19, 2016
1. Consistent template literals in `console.log()`.
2. === instead of ==.
3. const instead of var.

PR-URL: nodejs#9628
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
@targos
Copy link
Member

targos commented Nov 19, 2016

Landed in 4527994. Thanks!

@targos targos closed this Nov 19, 2016
@vsemozhetbyt vsemozhetbyt deleted the patch-1 branch November 19, 2016 17:13
@targos targos removed their assignment Nov 19, 2016
addaleax pushed a commit that referenced this pull request Nov 22, 2016
1. Consistent template literals in `console.log()`.
2. === instead of ==.
3. const instead of var.

PR-URL: #9628
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
1. Consistent template literals in `console.log()`.
2. === instead of ==.
3. const instead of var.

PR-URL: #9628
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
1. Consistent template literals in `console.log()`.
2. === instead of ==.
3. const instead of var.

PR-URL: #9628
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
doc Issues and PRs related to the documentations. readline Issues and PRs related to the built-in readline module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants