★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/22219Nouvelle recherche | Portail wanayoo
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

tls: refactor variable declarations #22219

Closed
wants to merge 1 commit into from

Conversation

@oygen87
Copy link
Contributor

oygen87 commented Aug 9, 2018

change var to const

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
refactor
change var to const
@Trott

This comment has been minimized.

@jasnell

jasnell approved these changes Aug 9, 2018

@Trott Trott added the author ready label Aug 9, 2018

@cjihrig

cjihrig approved these changes Aug 9, 2018

@sagirk

sagirk approved these changes Aug 10, 2018

Copy link
Member

sagirk left a comment

LGTM! 🎉

@devsnek devsnek changed the title refactor tls: refactor variable declarations Aug 12, 2018

var out = Object.create(null);
var parts = s.split('\n');
const out = Object.create(null);
const parts = s.split('\n');
for (var i = 0, len = parts.length; i < len; i++) {

This comment has been minimized.

@aduh95

aduh95 Aug 12, 2018

Contributor

Shouldn't we replace the for loop by a for-of loop?

This comment has been minimized.

@jasnell

jasnell Aug 12, 2018

Member

Using the traditional for loop is still significantly faster than for-of and is fairly idiomatic still within Node.js core js.

jasnell added a commit that referenced this pull request Aug 12, 2018

tls: change var to const
PR-URL: #22219
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
@jasnell

This comment has been minimized.

Copy link
Member

jasnell commented Aug 12, 2018

Landed in 74d3363

@jasnell jasnell closed this Aug 12, 2018

rvagg added a commit that referenced this pull request Aug 13, 2018

tls: change var to const
PR-URL: #22219
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

@rvagg rvagg referenced this pull request Aug 13, 2018

Merged

Release proposal: v10.9.0 #22295

rvagg added a commit that referenced this pull request Aug 13, 2018

tls: change var to const
PR-URL: #22219
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.