If you’re reading this you’re likely already a programmer. This means you have likely used .sort() in your code many times. I honestly can’t remember how many times I’ve sorted data one way or another. Just because you’ve called sort on an array doesn’t mean you’re necessarily doing the best way you can. Does the following code look familiar to you?
Blog NotesI created a final factory for handling complex sorting with ascending and descending order handled in a SQL style. This will allow for sorts like the following: keyedSortFactory.build(['column1 asc', 'column2 desc', 'column3 desc']); Please see the gist here: Keyed Sort Factory