Currently, the value of the deterministic generator is nailed down in FakerSettings. It is used in the function generateWithSettings.
I propose that this function checks if:
- A certain environment variable is set.
- It parses to a number.
- The value of the generator in the given settings is default.
- The mode of generation is deterministic.
— And if all are true, the value of the parsed environment variable is used as the generator instead of the default value.
The goal is to make it possible to adjust the generator in a convenient way. Of course there are already ways to adjust the generator, but they all require passing it around the code one way or another, which is rather inconvenient.
This change is conservative and backwards compatible. I can write the code and make a pull request.
Currently, the value of the deterministic generator is nailed down in
FakerSettings. It is used in the functiongenerateWithSettings.I propose that this function checks if:
— And if all are true, the value of the parsed environment variable is used as the generator instead of the default value.
The goal is to make it possible to adjust the generator in a convenient way. Of course there are already ways to adjust the generator, but they all require passing it around the code one way or another, which is rather inconvenient.
This change is conservative and backwards compatible. I can write the code and make a pull request.