* Sort each inner list smallest to largest
* Sort the list of lists lexicographically
It amazed that (a) how stupid javascript's default sort is, and (b) how none of the famous libraries (underscore/lodash) seem to have even fixed the problem of arrays not being compared element-wise, or provide an easy drop-in replacement.EDIT: I replaced the word 'lexicographic' with 'element-wise', as I think it might be causing confusion.