Closed allumbra closed 3 years ago
Hi, thank you for using mocker-data-generator As is written in the documentation you have to pass exactly a json syntax, your definition is valid for javascript but is not valid as a JSON, you have examples for integer fn and I assume it works for string too:
{
chance: 'string({ "length": 8, "casing": "upper", "alpha": true, "numeric": true })'
}
You can test here: https://danibram.github.io/mocker-data-generator/
Thanks!
I hope this is resolved. So Im going to close that
In the playground, I tried to use
chance: "string({ length: 8, casing: 'upper', alpha: true, numeric: true })"
which seems to break (i.e. no output)This works fine:
chance: "string()"
What is the correct way to translate the chance.string call for mocker?