-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
lib: Replace String concatenation with template #16922
Conversation
lib/internal/v8_prof_polyfill.js
Outdated
@@ -79,7 +79,7 @@ var line = ''; | |||
|
|||
function peekline() { | |||
const s = readline(); | |||
line = s + '\n' + line; | |||
line = `s \n` + line; |
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.
change s
as ${s}
as we need to append the const variable s instead of the letter s.
1bd5aa8
to
cb2cc74
Compare
lib/internal/v8_prof_polyfill.js
Outdated
@@ -79,7 +79,7 @@ var line = ''; | |||
|
|||
function peekline() { | |||
const s = readline(); | |||
line = s + '\n' + line; | |||
line = `${s} \n` + line; |
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.
this can cover the entire line... e.g.
line = `${s} \n${line}`;
cb2cc74
to
e4e66f3
Compare
@jasnell Thanks for your review.I have addressed your comments |
PR-URL: #16922 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
PR-URL: #16922 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)