1.0.3 • Published 5 years ago

is-sorted-ts v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

is-sorted-ts NPM version Linux Build Status

A small module to check if an Array is sorted

Install

Install with npm:

$ npm install --save is-sorted-ts

Usage

const isSorted = require('is-sorted-ts')

console.log(isSorted([])) // true
console.log(isSorted([1, 2, 3])) // true
console.log(isSorted([3, 2, 1], (a, b) => b - a)) // false