Checks if the provided value is an array AND its length is in a boundary (inclusive). If min and max are the same, it tests for exact length.
min
max
possibly an array
minimum possible length (inclusive)
Optional
maximum possible length (inclusive)
if minLen or maxLen are defined but are not numbers. Delegates to inRangeInt().
minLen
maxLen
inRangeInt()
isArrLen([1, 2, 3], 2, 4) => trueisArrLen([1, 2, 3], 5, 10) => falseisArrLen([1, 2, 3], 3, 3) => trueisArrLen([1, 2, 3], 3) => true // The length is at least 3isArrLen([1, 2, 3], undefined, 3) => true // The length is at most 3isArrLen([1, 2, 3], 1, 2) => falseisArrLen(null, 1, 4) => false Copy
isArrLen([1, 2, 3], 2, 4) => trueisArrLen([1, 2, 3], 5, 10) => falseisArrLen([1, 2, 3], 3, 3) => trueisArrLen([1, 2, 3], 3) => true // The length is at least 3isArrLen([1, 2, 3], undefined, 3) => true // The length is at most 3isArrLen([1, 2, 3], 1, 2) => falseisArrLen(null, 1, 4) => false
Checks if the provided value is an array AND its length is in a boundary (inclusive). If
minandmaxare the same, it tests for exact length.