module: move unnecessary work for early return
The exts and trailingSlash variables are only used if the path isn't cached. This commit moves them further down in the code, and changes from var to const. PR-URL: https://github.com/nodejs/node/pull/3579 Reviewed-By:Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Trevor Norris <trev.norris@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <mic.besace@gmail.com>
parent
521f51ac
Please register or sign in to comment