Explicitly for MD5 hashes, then there is no NATIVE equivalent in Javascript. MD5 is weak enough to have been deprecated out of the SubtleCrypto library. SHA1 is still supported, but has also been cracked recently, so I would use SHA-2 (SHA-256, SHA-384, and SHA-512 are different sizes of this same algorithm, which can be confusing -- they're all SHA-2) for any security-related projects. If you just want this as a quick way to determine that one lump of data is different than another, then SHA-1 is sufficient.
Here's Mozilla's writeup of the SubtleCrypto.digest method to do this:
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest