Skip to content

A small module to check if an Array is sorted

License

Notifications You must be signed in to change notification settings

zhenghan2017/is-sorted

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-sorted

TRAVIS NPM js-standard-style

A small module to check if an Array is sorted.

Example

var sorted = require('is-sorted')

console.log(sorted([1, 2, 3]))
// => true

console.log(sorted([3, 1, 2]))
// => false

// supports custom comparators
console.log(sorted([3, 2, 1], function (a, b) { return b - a })
// => true

LICENSE MIT

About

A small module to check if an Array is sorted

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%