Skip to content
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

Is it possible to pass parameters for chance.js types? #11

Open
ericwastaken opened this issue Aug 29, 2017 · 1 comment
Open

Is it possible to pass parameters for chance.js types? #11

ericwastaken opened this issue Aug 29, 2017 · 1 comment

Comments

@ericwastaken
Copy link

The library chance.js supports passing parameters to certain types as documented in http://chancejs.com/.

For instance, it's possible to ask for an integer between say 1 and 100.

Is it possible to pass those parameters in the fony template?

For instance, I've tried many variations including:

fony -t '{"name": "name", "age": "integer{min:18, max:65}"}' -c 2

Which returns

[
  {
    "name": "Marion Castillo",
    "age": null
  },
  {
    "name": "Addie Robertson",
    "age": null
  }
]

Thanks for this great utility!

@mukeshrijhwani
Copy link

+1
Thanks for the super awesome cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants