checksort
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

checksort

check if an Array is sorted.

Example

const sorted = require('checksort')

console.log(checksort([1, 3, 5]))
// => true

console.log(checksort([2, 7, 0]))
// => false

// pass comparators
console.log(checksort([11, 5, 2], function (a, b) { return b - a }))
// => true

LICENSE MIT

Package Sidebar

Install

npm i checksort

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.74 kB

Total Files

6

Last publish

Collaborators

  • tomasuno