Function
every
(collection: Iterable<Predicate<A>>)
Source from the content-addressed store, hash-verified
| 1834 | * @since 2.0.0 |
| 1835 | */ |
| 1836 | export function every<A>(collection: Iterable<Predicate<A>>): Predicate<A> { |
| 1837 | return (a) => { |
| 1838 | for (const p of collection) { |
| 1839 | if (!p(a)) { |
| 1840 | return false |
| 1841 | } |
| 1842 | } |
| 1843 | return true |
| 1844 | } |
| 1845 | } |
| 1846 | |
| 1847 | /** |
| 1848 | * Creates a predicate that returns `true` if any predicate in the collection returns `true`. |
Callers
nothing calls this directly
Tested by
no test coverage detected