Proposal: use `is-buffer` module
mattdesl opened this issue ยท 4 comments
mattdesl commented
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.
mattdesl commented
mattdesl commented
At some point in the distant future I may end up submitting a similar PR to your sha-1
module.