node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

alpha-sort

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