Closed JeanRasin closed 4 years ago
I dont understand what you mean by a random constant, this is not a generator itself it takes the most famous generators, and packed it. So if the generators packed have this option yes, if not no. This are the generators that are included:
Faker: [https://github.com/Marak/faker.js] Chance: [https://github.com/victorquinn/chancejs] Casual: [https://github.com/boo1ean/casual] RandExpJs: [https://github.com/fent/randexp.js]
For example, I need 1000 random entries. But I need them to be the same every time I start. And there is a constant from which random data is generated. Each time I have the same data set. There is such a feature in the library that I use on the backend. Very comfortably.
Hi @JeanRasin ! No sorry, the aim of the library is to be an aggregator of some libraries and provide a common interface to generate the data, so, if that agregated libraries doesnt have that option its hard for the library to implement that.
@danibram Faker does have that feature: http://marak.github.io/faker.js/#toc11__anchor. Do we have access to the faker object at all?
Sorry!Right now is not posible to modify the instance of faker that runs inside the generator, Im planning a completely rework, and split the generator from the generators so in that case you will be able to specify what generator you want to use, but right now its not possible. thanks!
For tests, it is often convenient to manage randomness. You set a constant and the generator constantly produces the same random result. Do you have such an opportunity?