0.0.1 • Published 3 years ago
@comparison-sorting/is-sorted v0.0.1
:heavy_check_mark: @comparison-sorting/is-sorted
Order validation for JavaScript. See docs.
import {isSorted} from '@comparison-sorting/is-sorted';
import {increasing, decreasing} from '@total-order/primitive';
isSorted(increasing, [1, 2, 3], 0, 3); // true
isSorted(decreasing, [1, 2, 3], 0, 3); // false