documentcloud/backbone — Issue #984: `sort` and `sortBy` are incorrectly swopped in collection.comparator docs
Author: peterp
Created: 2012-02-10 13:04:19+00:00
State: open

http://documentcloud.github.com/backbone/#Collection-comparator

`sort` and `sortBy` are swopped around in colleciton.comparator documents.

"sort" comparator functions take a model and return a numeric or string value by which the model should be ordered relative to others. "sortBy" comparator functions take two models, and return -1 if the first model should come before the second, 0 if they are of the same rank and 1 if the first model should come after.

`sortBy` takes one argument; `sort` takes two.