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. Short-circuits on the first false. 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.