Example: - https://github.com/boo1ean/mersenne-twister - https://github.com/pigulla/mersennetwister - And in general: https://github.com/search?l=JavaScript&q=mersenne+twister&type=Repositories - The most interesting to implement is the general algorithm: https://en.wikipedia.org/wiki/Mersenne_Twister#Pseudocode
Example: