Skip to main content

Iterator: Every

Run a predicate sub-graph once per element of an input list and emit true only if every element returned true. The predicate is read from the auto-created Iterator::Collect's collect connector (shown as "Match (boolean)" in the editor); any collected value that is not exactly true — including a missing or non-boolean value — counts as false. Short-circuits on the first non-true result. Mirrors JavaScript's Array.prototype.every.

Example
Input: [2, 4, 6]
Body: el → el % 2 === 0
Output: true

Input: [2, 4, 5]
Body: el → el % 2 === 0
Output: false

Parameters

This function has no parameters.

Input

Arrayrequired

List to iterate over (Array or JSON array).

Value

Optional value injected into every iteration as value on the entry node.

Output

Result

true if every element matched, false otherwise.