Describe the feature
// v1.x: every([]) → false
// v2.0: every([]) → true (matches Array.prototype.every semantics)
Rationale
JavaScript's [].every(fn) returns true. The v1.x behavior was non-standard and
asymmetric with none([]) → true.
Migration
Use $expr with length check if you need to deny empty arrays:
{ items: { length: ['gt', 0], $expr: ['every', { status: ['eq', 'active'] }] } }
Implementation Tasks
Additional information
Final checks
Describe the feature
Rationale
JavaScript's
[].every(fn)returnstrue. The v1.x behavior was non-standard andasymmetric with
none([])→true.Migration
Use
$exprwith length check if you need to deny empty arrays:Implementation Tasks
(value as any[]).length === 0early return ineveryhandlerAdditional information
Final checks