@comparison-sorting/is-sorted
v0.0.1
Published
Order validation for JavaScript
Downloads
124
Readme
: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