Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdate dependencies. Update codebase to ES6/Node4 #51
Conversation
lib/directory.js
Outdated
var path = paths[i]; | ||
const normalized = []; | ||
const il = paths.length; | ||
for (let i = 0; i < il; ++i) { |
This comment has been minimized.
This comment has been minimized.
lib/directory.js
Outdated
var hasTrailingSlash = (resource[resource.length - 1] === '/'); | ||
var fileOptions = { lookupCompressed: settings.lookupCompressed, etagMethod: settings.etagMethod }; | ||
const resource = request.path; | ||
const hasTrailingSlash = (resource[resource.length - 1] === '/'); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
escalant3
Dec 17, 2015
Author
Contributor
I think endsWith
is more readable. I'll change it back if needed.
This comment has been minimized.
This comment has been minimized.
lib/directory.js
Outdated
html += '<li><a href="' + internals.pathEncode(parent) + '">Parent Directory</a></li>'; | ||
} | ||
|
||
for (var i = 0, il = files.length; i < il; ++i) { | ||
const il = files.length; | ||
for (let i = 0; i < il; ++i) { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks – merged in cbab9fc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
escalant3 commentedDec 16, 2015
I have been exploring the Hapi codebase recently and I noticed
inert
was not ES6 ready. This PR should comply with all the requirements specified in #49The linter was complaining about lots of things that were fixed:
arguments
, too bad the rest operator is not available).use
strict andconst
always that it's possible.let
only in mutable casespackage.json
dependencies matching those inhapi/package.json
else
should not be in the same line where the previousif
closesQuestions:
4.0.0
. But I am not sure how the Hapi team deals with versions.+=
. I could do it if needed.Thanks for such an awesome framework. I hope this helps.
Cheers!