some
Checks if at least one entry of a Map satisfies the predicate. Short-circuits on the first match.
Available since v3.0.3
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
map | ReadonlyMap<K, V> | The Map to check |
predicate | function | Function invoked with (value, key) |
Returns
Section titled “Returns”boolean — true if at least one entry matches, false otherwise (including for an empty map)
Examples
Section titled “Examples”Check if any value exceeds a threshold
Section titled “Check if any value exceeds a threshold”Returns true as soon as one entry satisfies the predicate.
Empty map
Section titled “Empty map”Always returns false for an empty map.
