cannot get it working in angular
kissenger opened this issue · comments
I have the current question open in SO, do you have any ideas how to fix?
https://stackoverflow.com/questions/58192960/how-to-fix-property-seedrandom-does-not-exist-on-type-math?noredirect=1#comment102795124_58192960
When inside a node app, Math.random is not available; instead you want
var seedrandom = require('seedrandom');
var rng = seedrandom(1);
console.log(rng());
Looks like the SO thread has answered the question; here is the fixed example from the thread: