starry.every
v4.0.0
Published
Member of the starry suite—modular functions for iterable objects.
Maintainers
Readme
Member of the starry suite—modular functions for iterable objects.
Status
Applies to the whole suite.
Usage
function every<T = any>(
iterable: Iterable<T>,
predicate: (item: T) => boolean = x => x as T & boolean
): booleanReturns whether every element in the iterable satisfies the predicate.
every called on an empty iterable is vacuously true.
Parameters:
- iterable:
Iterable<T> - predicate:
(T) => boolean. Default:x => x
Returns: boolean
