browserify / sha.js

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

Use inherits module instead of util #15

Closed Kagami closed 9 years ago

Kagami commented 9 years ago

Hi. I replaced util module with inherits because it's much smaller (0.7K vs 15.6K) so it will be faster downloaded in a browser, etc.

dcousens commented 9 years ago

ACK, but its not unlikely that the util module is already being pulled in by browserify in other packages. This might only be useful in the isolated case. @dominictarr ?

dominictarr commented 9 years ago

@dcousens you are probably right, but I think @Kagami still has a pretty good case, until browserify can do dead code elimination, at least. Most uses of util is util.inherits i think, so probably you could update those other ones too.

dominictarr commented 9 years ago

@dcousens so I'm :+1: if you concur

dominictarr commented 9 years ago

okay I decided this isn't worth expending an email round trip. merging.

dominictarr commented 9 years ago

merged into 2.3.1

Kagami commented 9 years ago

Thanks!

dcousens commented 9 years ago

As I said, I'm OK with (and even for) this change. But it is senseless without cooperation of other modules in which it is most commonly combined, most of which [currently] use util.inherits. On 11 Jan 2015 10:16 pm, "Dominic Tarr" notifications@github.com wrote:

@dcousens https://github.com/dcousens so I'm [image: :+1:] if you concur

— Reply to this email directly or view it on GitHub https://github.com/dominictarr/sha.js/pull/15#issuecomment-69490877.

Kagami commented 9 years ago

In my simple use case (~10 dependencies) libraries tend to use inherits: [1], [2]. If some library uses util.inherits instead I think it's possible to cooperate with maintainer and fix this too (as @dominictarr said).

dcousens commented 9 years ago

Agreed. I was just pointing this out :) On 12 Jan 2015 12:37 am, "Kagami Hiiragi" notifications@github.com wrote:

In my simple use case (~10 dependencies) libraries tend to use inherits: [1] https://github.com/indutny/hash.js/blob/master/lib/hash/utils.js#L2, [2] https://github.com/indutny/elliptic/blob/master/lib/elliptic/curve/mont.js#L5 . If some library uses util.inherits instead I think it's possible to cooperate with maintainer and fix this too (as @dominictarr https://github.com/dominictarr said).

— Reply to this email directly or view it on GitHub https://github.com/dominictarr/sha.js/pull/15#issuecomment-69494731.

dominictarr commented 9 years ago

thanks