pvorb/node-md5

Proposal: use `is-buffer` module

mattdesl opened this issue ยท 4 comments

This module could use is-buffer to check if the input object is a node Buffer, which will not cause the Buffer polyfill to be added during browserification.

The filesize differences:
Before PR: 25kb
After PR: 6kb

browserify md5.js | uglifyjs -cm | wc -c

Thanks for this module! I'm using it here: marvel-comics-api. ๐Ÿ˜„ ๐Ÿค˜

pvorb commented

@mattdesl Yup, that makes sense. I'll wait with merging the PR until I managed to do the md5/MD5 fusion.

๐ŸŽ‰ thanks

At some point in the distant future I may end up submitting a similar PR to your sha-1 module. ๐Ÿป Hope that's cool.

pvorb commented

Sure it's cool. Also consider submitting a PR for clone. ๐Ÿ˜