We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
any
Something like:
var number = g.pick([ g.integer({min: -100, max: 100}), g.integer, g.floating({min: -100, max: 100}), g.floating ]) var stringNumber = number.map(function (v) { return String(v) }) var anyPrimitive = g.pick([number, g.string, g.pick([ -0, +0, 0, undefined, null, false, true, NaN, Infinity, -Infinity, '', [], stringNumber, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER, Number.MAX_VALUE, Number.MIN_VALUE ])]) var any = g.weighted([anyPrimitive, g.array(anyPrimitive)], [10, 1])
It should also be capable of generating random objects and nested arrays.
The text was updated successfully, but these errors were encountered:
Good idea! Sounds really useful for trying to find errors in input sanitation/validation code.
Sorry, something went wrong.
Could also include magic values if available?
Yes it should just be based on the number and text generators, then you get that for free.
This generator should also produce nested objects and arrays.
I think it would be nice to just say how many leafs you want and generate a random tree structure connecting the leafs with random branches.
We might also allow to generate any primitive as well.
No branches or pull requests
Something like:
It should also be capable of generating random objects and nested arrays.
The text was updated successfully, but these errors were encountered: