New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom methods ? #21
Comments
Well, I speaked a bit too quickly. Sorry for that. |
Sorry, but |
Sorry :) That would allow us to create some custom generators too... But for now, i don't really know the state of this issue, as i'm really, really tired... Whatever, do you think it's possible to implement something like this in the future ? |
Hi! Here, i'm back with a more constructive explanation. For example, I have this seed:
The idea is to be able to pass custom data generators methods to to properties, maybe a callback or something...
Then in the hook, you may test if the field is a string or a method and use faker or call the method accordingly... What do you think ? |
Hi !
There is an issue with random.number, we can't set a minimum/maximum value:
field: {{random.number}}
- gives a random numberfield: {{random.number(x)}}
- gives a random value, x being the maxfaker.random.number({min:x, max:y})
- Gives a randome value between x and yfield: {{random.number({min:x, max:y})}}
returnsNaN
So I was wondering of there is a possibility to add custom generators to Sails-hook-sanseed, or if it is planned.
Thanks for your work.
Edit The question has been developped below.
The text was updated successfully, but these errors were encountered: