Function
every
(collection: Iterable<Predicate<A>>)
Source from the content-addressed store, hash-verified
| 1899 | * @since 2.0.0 |
| 1900 | */ |
| 1901 | export function every<A>(collection: Iterable<Predicate<A>>): Predicate<A> { |
| 1902 | return (a) => { |
| 1903 | for (const p of collection) { |
| 1904 | if (!p(a)) { |
| 1905 | return false |
| 1906 | } |
| 1907 | } |
| 1908 | return true |
| 1909 | } |
| 1910 | } |
| 1911 | |
| 1912 | /** |
| 1913 | * 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