Refinement to limit the number of keys on a `record`

Author: nikwenCreated Dec 10, 2024Updated Dec 10, 2024

When validating user-supplied records, it would be great to be able to limit them in size (e.g. allow 0-100 keys).

It could look like this:

typescript
size(record(string(), number()), 0, 100)

Source: ianstormtaylor/superstruct