andrewplummer/Sugar — pull request #386 by eric-wieser (2013-10-24 13:33:55+00:00)
Title: Allow sorting/mapping by multiple keys

This allows arrays to be sorted by multiple keys:
```javascript
> arr = [{a:'foo', b: 1},{a:'bar', b: 2},{a:'skittles', b: 1}];
> arr.sortBy(['b', 'a'])
[{a:'foo',b:1},{a:'skittles',b:1},{a:'bar', b:2}]
```

This requires both improved comparison (`arr1 < arr2` means `arr1.join(',') == arr2.join(',')`, which can cause weirdness with commas in values), and `transformArgument` to accept arrays.