@comparison-sorting/is-sorted
Version:
Order validation for JavaScript
28 lines (23 loc) • 2.5 kB
Markdown
:heavy_check_mark: [@comparison-sorting/is-sorted](https://comparison-sorting.github.io/is-sorted)
==
Order validation for JavaScript.
See [docs](https://comparison-sorting.github.io/is-sorted/index.html).
```js
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
```
[](https://raw.githubusercontent.com/comparison-sorting/is-sorted/main/LICENSE)
[](https://www.npmjs.org/package/@comparison-sorting/is-sorted)
[](https://github.com/comparison-sorting/is-sorted/actions/workflows/ci:test.yml?query=branch:main)
[](https://david-dm.org/comparison-sorting/is-sorted)
[](https://david-dm.org/comparison-sorting/is-sorted?type=dev)
[](https://github.com/comparison-sorting/is-sorted/issues)
[](https://www.npmjs.org/package/@comparison-sorting/is-sorted)
[](https://codeclimate.com/github/comparison-sorting/is-sorted/issues)
[](https://codeclimate.com/github/comparison-sorting/is-sorted/trends/churn)
[](https://codecov.io/gh/comparison-sorting/is-sorted)
[](https://codeclimate.com/github/comparison-sorting/is-sorted/trends/technical_debt)
[](https://comparison-sorting.github.io/is-sorted/source.html)
[](https://bundlephobia.com/result?p=@comparison-sorting/is-sorted)