Repository navigation
Comparing changes
Open a pull request
base repository: nodejs/node
base: 410eb97bcea9bf8fb15c1b980a19c3a8daaa6824
head repository: nodejs/node
compare: 0fd5b458bec739eb8b4cea4dc362a36eb3e61fde
- 8 commits
- 1 file changed
- 1 contributor
Commits on Mar 1, 2019
-
1) This uses some ternary expressions instead of if else to assign some variables. 2) Use template strings instead of concat. 3) Use the object shortand notation. 4) Some var to let / const. 5) Removed some double line breaks. 6) Less brackets around statements if not necessary. PR-URL: #25278 Reviewed-By: Michaël Zasso <targos@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 05a8dbc - Browse repository at this point
Copy the full SHA 05a8dbcView commit details -
1) Refactor for loops to while loops that were only meant to count up a variable. 2) Refactor some `var` statements to `let` / `const`. 3) Simplify return conditions. 4) Use template strings where possible instead of concat. 5) Use ternary expressions for variable assignments instead of if / else. 6) Use the object shorthand notation for the function declarations. 7) Consolidate if else case where possible. 8) Remove double line breaks. PR-URL: #25278 Reviewed-By: Michaël Zasso <targos@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9d19b1f - Browse repository at this point
Copy the full SHA 9d19b1fView commit details -
path: refactor more path code for simplicity
1) Consolidate format to a single function. 2) Move some code that can only be reached in some code branches that was formerly executed in all cases. 3) Explicitly check for the string length of zero instead of converting the string to a boolean. 4) Consolidate nested if statements if possible e.g., if (foo) { if (bar) { /* do stuff */ } } to reduce indentation depth. 5) Simplify checks by removing extra length checks when comparing two strings. 6) Use object shorthand notation where possible. PR-URL: #25278 Reviewed-By: Michaël Zasso <targos@protonmail.com>Configuration menu - View commit details
-
Copy full SHA for a019d7b - Browse repository at this point
Copy the full SHA a019d7bView commit details -
1) Consolidate nested if statements if possible `if (foo) { if bar () { /* do stuff */ } }`) to reduce indentation depth. 2) Remove obsolete else cases to reduce indentation. PR-URL: #25278 Reviewed-By: Michaël Zasso <targos@protonmail.com>Configuration menu - View commit details
-
Copy full SHA for f59fdd9 - Browse repository at this point
Copy the full SHA f59fdd9View commit details -
path: refactor logic for to reduce code branches
This refactoring makes sure some code branches will not be hit if they do not have to be reached. PR-URL: #25278 Reviewed-By: Michaël Zasso <targos@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for e750e95 - Browse repository at this point
Copy the full SHA e750e95View commit details -
path: simplify code and remove obsolete checks
Either `end` is `-1` or `startPart` is not `0`. Therefore it's possible to move the conditions in a way that we eliminate a few code branches. PR-URL: #25278 Reviewed-By: Michaël Zasso <targos@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for e68b0d6 - Browse repository at this point
Copy the full SHA e68b0d6View commit details -
path: refactor for less indentation
This moves the `if (len === 1)` case to the top of the function. That way it is possible to reduce the indentation level due to returning early in that case. On top of that the following was done: 1) For clarity refactored for loops which were meant to count up a variable into a while loop. 2) Used template strings instead of string concat. 3) Consolidating nested if statements. 4) Using tenary expressions if applicable when assigning variables to reduce the code overhead. PR-URL: #25278 Reviewed-By: Michaël Zasso <targos@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7cbe29e - Browse repository at this point
Copy the full SHA 7cbe29eView commit details -
path: refactor code for clarity
This moves a condition inside of a for loop which can only be triggered at the very end of the for loop outside of the loop. That way the for loop itself is much simpler and easier to understand and the code itself is less indented which should increase the readability. It also refactors some `var` to `let` and `const`. PR-URL: #25278 Reviewed-By: Michaël Zasso <targos@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0fd5b45 - Browse repository at this point
Copy the full SHA 0fd5b45View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 410eb97bcea9bf8fb15c1b980a19c3a8daaa6824...0fd5b458bec739eb8b4cea4dc362a36eb3e61fde