Skip to content
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

url: refactor lib/internal/url.js #10912

Closed
wants to merge 1 commit into from
Closed

url: refactor lib/internal/url.js #10912

wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Jan 20, 2017

This PR addresses some minor nits I meant to leave on a recent pull request but didn't. /cc @TimothyGu

  • set an identifier for the separator rather than using multiple
    instances of the same literal
  • consisitent arrow function body formatting
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

url

@Trott Trott added the whatwg-url Issues and PRs related to the WHATWG URL implementation. label Jan 20, 2017
@nodejs-github-bot nodejs-github-bot added dont-land-on-v4.x whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Jan 20, 2017
@Trott
Copy link
Member Author

Trott commented Jan 20, 2017

@sam-github
Copy link
Contributor

spelling: "consisitent"

const length = output.reduce(
(prev, cur) => prev + cur.replace(colorRe, '').length + separator.length,
-separator.length
);
Copy link
Member

Choose a reason for hiding this comment

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

This code was originally from lib/util.js, so you might be interested in changing the style there as well.

* set an identifier for the separator rather than using multiple
  instances of the same literal
* consistent arrow function body formatting
Trott added a commit to Trott/io.js that referenced this pull request Jan 23, 2017
* set an identifier for the separator rather than using multiple
  instances of the same literal
* consistent arrow function body formatting

PR-URL: nodejs#10912
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@Trott
Copy link
Member Author

Trott commented Jan 23, 2017

Landed in 6b6123c

@Trott Trott closed this Jan 23, 2017
targos pushed a commit that referenced this pull request Jan 28, 2017
* set an identifier for the separator rather than using multiple
  instances of the same literal
* consistent arrow function body formatting

PR-URL: #10912
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@italoacasas italoacasas mentioned this pull request Jan 29, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
* set an identifier for the separator rather than using multiple
  instances of the same literal
* consistent arrow function body formatting

PR-URL: nodejs#10912
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
* set an identifier for the separator rather than using multiple
  instances of the same literal
* consistent arrow function body formatting

PR-URL: nodejs#10912
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@Trott Trott deleted the reduce branch January 13, 2022 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

9 participants