soldair/node-binarysearch — pull request #2 by nlacasse (2013-11-11 23:50:11+00:00)
Title: Comparitor should be able to return any Number type

Hey Ryan,

While using your awesome mergesort-stream library, I noticed that I couldn't write my comparitors they way I was used to.

I like to do comparitors like:
```
function(v1, v2){ return v1 - v2; }
```
Because it's shorter than doing the if-else statement and returning +1, -1, and 0.

The [MDN description of sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) not only allows for this type of comparitor, but shows it as the example of comparing numbers.

This PR makes comparitors like the above work. It also fixes a bug in _defaultComparitor that resulted in ``indexMode`` always being ``false``.