node package manager

alpha-sort

Alphabetically sort an array of strings

alpha-sort Build Status

Alphabetically sort an array of strings

With correct sorting of unicode characters.

Install

$ npm install --save alpha-sort

Usage

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

API

alphaSort.asc

Ascending sort.

alphaSort.desc

Descending sort.

License

MIT © Sindre Sorhus