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