Creates a Predicate function that checks if all elements of an Iterable are sorted according to a Comparator.
Check if iterable is sorted
iterable
const isSortedByNumber = isSorted(numberComparator);const iterable = [1,2,2,3];const result = isSortedByNumber(iterable);console.log(result); // true
the Predicate
the Iterable value type
the Comparator to use
Generated using TypeDoc
Creates a Predicate function that checks if all elements of an Iterable are sorted according to a Comparator.
Exmaple
Check if
iterableis sortedReturns
the Predicate