Changing the following would allow the same file to be loaded in either nodejs or the browser:
From:
/* These real versions are due to Isaku Wada, 2002/01/09 added */
module.exports = MersenneTwister;
To:
/* These real versions are due to Isaku Wada, 2002/01/09 added */
//Note process should exist only in nodejs, while window exists only in the browser
if(typeof process !== 'undefined' && typeof window === 'undefined')
{
module.exports = MersenneTwister;
}
If it is not too inconvenient, please apply this change to the repo and update the npm version/package.
Changing the following would allow the same file to be loaded in either nodejs or the browser:
From:
To:
If it is not too inconvenient, please apply this change to the repo and update the npm version/package.