| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Two variables are declared twice with `var` in the same scope in `lib/fs.js`. This change refactors the code so the variable is declared just once.
|
LGTM |
Sorry, something went wrong.
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
There was a problem hiding this comment.
this is fine but...
const nextPartRe = isWindows ?
/(.*?)(?:[\/\\]+|$)/g :
/(.*?)(?:[\/]+|$)/g;
const splitRootRe = isWindows ?
/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/ :
/^[\/]*/;
Sorry, something went wrong.
There was a problem hiding this comment.
I thought about doing that, but wanted to keep the change as small as reasonable. But that was a guideline I applied and not a hard rule, so yeah, I'm happy to make that change.
Sorry, something went wrong.
|
minor suggestion but LGTM |
Sorry, something went wrong.
|
Switched to ternary operator per comment from @jasnell. CI again: https://ci.nodejs.org/job/node-test-pull-request/1486/ |
Sorry, something went wrong.
Two variables are declared twice with `var` in the same scope in `lib/fs.js`. This change refactors the code so the variable is declared just once. PR-URL: nodejs#4959 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Two variables are declared twice with `var` in the same scope in `lib/fs.js`. This change refactors the code so the variable is declared just once. PR-URL: #4959 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Two variables are declared twice with `var` in the same scope in `lib/fs.js`. This change refactors the code so the variable is declared just once. PR-URL: #4959 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Two variables are declared twice with `var` in the same scope in `lib/fs.js`. This change refactors the code so the variable is declared just once. PR-URL: #4959 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Two variables are declared twice with `var` in the same scope in `lib/fs.js`. This change refactors the code so the variable is declared just once. PR-URL: #4959 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Two variables are declared twice with `var` in the same scope in `lib/fs.js`. This change refactors the code so the variable is declared just once. PR-URL: nodejs#4959 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
| Back | FazBrowse Home | New Git URL |
Two variables are declared twice with var in the same scope in
lib/fs.js. This change refactors the code so the variable is declared
just once.