Skip to content

Alphabetically sort an array of strings

License

Notifications You must be signed in to change notification settings

videodesk/alpha-sort

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alpha-sort Build Status

Alphabetically sort an array of strings

With correct sorting of unicode characters.

Install

$ npm install --save alpha-sort

Usage

const alphaSort = require('alpha-sort');

['b', 'a', 'c'].sort(alphaSort.asc);
//=> ['a', 'b', 'c']

API

alphaSort.asc

Ascending sort.

alphaSort.desc

Descending sort.

Related

License

MIT © Sindre Sorhus

About

Alphabetically sort an array of strings

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%