Problem with state
kharandziuk opened this issue · comments
For some reasons the code bellow returns me an error:
const seedrandom = require('seedrandom');
const rng = new seedrandom('seed', { saved: true })
console.log(rng())
console.log(rng.state())
the error:
TypeError: rng.state is not a function
and my environment:
node -v
v10.6.0
#33 – I read that answer and added new
. It doesn't help
Try changing the second line:
const rng = new seedrandom('seed', { state: true })
So, stupid)
Thanks! it works!