Skip to content

doc: small improvements in readline code examples - #9628

Closed
vsemozhetbyt wants to merge 2 commits into
nodejs:masterfrom
vsemozhetbyt:patch-1
Closed

doc: small improvements in readline code examples#9628
vsemozhetbyt wants to merge 2 commits into
nodejs:masterfrom
vsemozhetbyt:patch-1

Conversation

@vsemozhetbyt

@vsemozhetbytvsemozhetbyt commented Nov 16, 2016

Copy link
Copy Markdown
Contributor
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

    varhits=completions.filter((c)=>{returnc.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-botnodejs-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
Copy Markdown
Contributor

LGTM

@mhdawsonmhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@targostargos 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
Copy Markdown
Member

Landed in 4527994. Thanks!

@targostargos closed this Nov 19, 2016
@vsemozhetbyt
vsemozhetbyt deleted the patch-1 branch November 19, 2016 17:13
@targostargos 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>
@MylesBorinsMylesBorins mentioned this pull request Dec 21, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.readlineIssues and PRs related to the built-in readline module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@vsemozhetbyt@JacksonTian@targos@jasnell@gonenduk@cjihrig@mhdawson@MylesBorins@nodejs-github-bot