Is there a library available that does that? I referred to this answer but it only has other versions not version 3 or 5.
A useful uuid implementation in JS is the package:
https://www.npmjs.com/package/uuid
why?
weekly downloads
13,478,626
also: Support for version 1, 3, 4 and 5 UUIDs
In the future, you could search NPM yourself and take as a reliable metric the weekly downloads.