If anyone wants a seedable, and therefore deterministic PRNG, use the seedrandom package https://www.npmjs.com/package/seedrandom
// Global PRNG: set Math.random.
seedrandom('hello.', { global: true });
console.log(Math.random()); // Always 0.9282578795792454
I found this useful when using worker threads to 'render' a construction by slices that included some randomness (that should be the same for each thread)