For cases where we wish to express that some data should be a non-negative integer, but the specific range does not matter.
The method should take in the same arguments as fake.integer() (min and max), but default to 1 and something like 20, respectively.
@mattpetrie and I don't believe there's much of a use case for any of these other variations:
- small negative integer
- small integer, allowed to be negative or positive
However, both the "small >0 int" (fake.smallPositiveInteger()) and "small >= 0 int" (fake.smallNonNegativeInteger()) cases seem common enough. Should we add both these methods? Is there a way to make this a single method with a param?
Is "small" a good descriptor?
The name is a bit long, but since we have fake.integer(), I don't think we should abbreviate to "int", for consistency.
For cases where we wish to express that some data should be a non-negative integer, but the specific range does not matter.
The method should take in the same arguments as
fake.integer()(min and max), but default to1and something like20, respectively.@mattpetrie and I don't believe there's much of a use case for any of these other variations:
However, both the "small >0 int" (
fake.smallPositiveInteger()) and "small >= 0 int" (fake.smallNonNegativeInteger()) cases seem common enough. Should we add both these methods? Is there a way to make this a single method with a param?Is "small" a good descriptor?
The name is a bit long, but since we have
fake.integer(), I don't think we should abbreviate to "int", for consistency.