While (again) working on my node.js irc client, I needed to sort the array of nicks, prefixed with their respective modes, so I could list them correctly in my nickname list. This likely doesn't encompass all available modes, but more could easily be added. Hope someone else finds it useful.