forked from zuriby/Faker.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Random to create a per-instance copy of the RNG
Before this change, it appeared that multiple, independent Faker instances were legal. But, when multiple instances were created, their shared random number generators would overwrite each others' states. After this change, each Random instance (and therefore each Faker instance) has its own copy of the random number generator, ensuring that calls to one Faker instance do not affect the stream of values generated by another.
- Loading branch information
1 parent
2ea9730
commit 8a33cf0
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters