js-md5
js-md5 copied to clipboard
v0.9.0
I noticed that there are many compatibile codes but they are useless nowadays since all browsers are supporting those features, no polyfill is required.
To further minimize the node, there should be a md5-lite.min.js
output file if you still want to keep the polyfills in the original version. Also, I am doubt about the hmac necessity. It seems no use to have hmac so that this is not included in md5-lite as well.
there are full.config.js
and lite.config.js
in src/config
such that when uglifyjs
run the compression, it can remove the polyfill in the lite version and keep them in the full version.
I have also updated the related testing such that the coverage report can reach 100%, by including the options for lite version.
To summary, lite version excludes md5.hmac and can run in all modern environments including Node 10+, Worker, Edge, Chrome, Firefox, Safari, except IE.
There are also some minor changes:
- Update
uglify-js
from 3.1.9 to 3.17.4 - In addition to
compress
andbuild
, there arecompress-lite
(md5.lite.js) andbuild-bun
(use bun instead of node to build) - Added
dist-src
anddist-lite
to for the output file in pretty format (they can be deleted or moved to testing output) - Changed to
node_modules
script link in testing html pages to CDN links - Changed Worker detection to
WorkerGlobalScope
File Size Reduction
- md5.min.js (0.8.3): 10 KB
- md5.min.js (0.9.0): 9 KB
- md5-lite.min.js: 8 KB
Thank you for PR, I will review this when I have time.