Repository navigation
Any
Dennis Corvers edited this page Oct 23, 2026
·
1 revision
Determines whether an iterable contains any values, or any values that satisfy a predicate.
exists = values:any(predicate)| Parameter | Type | Description |
|---|---|---|
predicate |
function(value, sourceKey) (optional) |
Returns true for a matching value. |
true when the iterable is non-empty if no predicate is supplied, or when at
least one predicate call returns exactly true. Otherwise false.
The predicate receives the source iterator key. any stops once it finds a
match.
local hasLowSupplies = LuaQ.from({
{ name = "Ada", potions = 8 },
{ name = "Bryn", potions = 2 },
})
:any(function(player) return player.potions < 3 end)
-- true- Home
- Getting Started
-
Functions
- aggregate
- all
- any
- concat
- contains
- count
- create
- createFrom
- deepCopy
- difference
- elementAt
- elementAtOrDefault
- first
- firstOrDefault
- flatMap
- foreach
- groupBy
- groupByResult
- indexOf
- intersect
- ipairs
- last
- lastOrDefault
- map
- max
- min
- pairs
- sequenceEquals
- single
- singleOrDefault
- sort
- sortBy
- sortByDescending
- sortDescending
- sum
- take
- takeWhile
- thenBy
- thenByDecending
- toLookup
- toMap
- toSet
- toTable
- union
- unique
- where
- zip
- Aliases