Tuple length does not specify array length
geraintluff opened this issue ยท 4 comments
geraintluff commented
Honestly, I haven't run it, but there's a line in your code that says:
if(data.length < schema.items.length) {
That looks like it fails if the data array is shorter than the "items" array.
If so, that's not quite correct - tuple typing assigns schemas to particular data items if they exist. If you want a minimum length as well, you need to specify minItems
.
IreneKnapp commented
Hmm, thank you for the feedback. I'll look at it sometime soon.
FDiskas commented
soon? :D ๐
gennbo commented
Internet never forgets :)
IreneKnapp commented
... are people using this library? If so, I can prioritize this. I admit, I'm surprised.