Based on the accepted answer here How to get the hash of Block and Transaction (which you probably already saw during your research) my conclusion is that there is no javascript implementation available and it seems somewhat pointless to try making one. The reason is that transaction hashes (and block hashes) are legacy stuff and ICP-ledger-only. Everything has moved to ICRC-1 and even the ICP-ledger has a dual interface. So anything produced for the ICP ledger’s transaction hashes would remain isolated to the ICP ledger.