-
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: update indentation of ternaries #14247
Conversation
There’s a typo in the commit message ;) |
lib/url.js
Outdated
result.host.split('@') : false; | ||
const authInHost = | ||
result.host && result.host.indexOf('@') > 0 ? | ||
result.host.split('@') : false; |
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 doesn’t need to be a ternary anyway, right? Just result.host && result.host.indexOf('@') > 0 && result.host.split('@')
works as well?
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.
Good idea! I don't think there's much of a chance this is being done as a ternary because it's more performant than the alternative approach you're suggesting here. But that's usually behind my reluctance to alter anything other than whitespace in these things. :-D
Fixed. Thanks! |
379141d
to
77b868a
Compare
77b868a
to
c915e9f
Compare
In preparation for stricter indentation linting and to increase code clarity, update indentation for ternaries in lib.
In preparation for stricter indentation linting and to increase code clarity, update indentation for ternaries in lib. PR-URL: nodejs#14247 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in d14c132 |
In preparation for stricter indentation linting and to increase code clarity, update indentation for ternaries in lib. PR-URL: #14247 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
In preparation for stricter indentation linting and to increase code clarity, update indentation for ternaries in lib. PR-URL: #14247 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
In preparation for stricter indentation linting and to increase code clarity, update indentation for ternaries in lib. PR-URL: nodejs#14247 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
In preparation for stricter indentation linting and to increase code clarity, update indentation for ternaries in lib. Backport-PR-URL: #14835 PR-URL: #14247 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
In preparation for stricter indentation linting and to increase code clarity, update indentation for ternaries in lib. Backport-PR-URL: #14835 PR-URL: #14247 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
In preparation for stricter indentation linting and to increase code
clarity, update indentation for ternaries in lib.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
lib tools