browserify / sha.js

Streamable SHA hashes in pure javascript
Other
288 stars 60 forks source link

Project Cleanup #9

Closed dcousens closed 10 years ago

dcousens commented 10 years ago

Chained on #8. See diff here.

Unlike #8, this is more open ended to subjectivity, with the pure intent of making increasing readability and making pull requests easier in future.

Personally, I found some aspects of the code misleading with so many cases of:

As pointed out by @dominictarr in https://github.com/dominictarr/sha.js/issues/7, the reason for the inconsitent Bufferuse (and probably the subsequent encoding functions) is because they were from a time where browserify wasn't as mature.

This PR isn't exhaustive, but, its a start.

Tested in Firefox 32, Chrome 37, and on Chrome Android 37.

dominictarr commented 10 years ago

this looks good. just one thing, you shouldn't change the licence in pull request. I'm not against that change, but it's a totally different sort of thing, that needs to be discussed separately to a pull request that is mostly about deleting unused code.

dcousens commented 10 years ago

No worries, it was actually in #8, but I'll move it wherever.

edit: moved to #10 and rebased

dominictarr commented 10 years ago

this is merged into 2.2.2