sortRange = function (toggleRangeA, toggleRangeB) {
  var aLine = toggleRangeA[1],
      aCol = toggleRangeA[2],
      bLine = toggleRangeB[1],
      bCol = toggleRangeB[2];
  if (aLine < bLine) {
    return -1;
  }
  if (aLine > bLine) {
    return 1;
  }
  if (aCol < bCol) {
    return -1;
  }
  if (aCol > bCol) {
    return 1;
  }
  return 0;
}
This is the sorting function we use to sort the toggle stacks in our getToggledRules method
First sorts by line and then by column if the lines are identical

@param {Array} toggleRangeA - The first rule to sort
@param {Array} toggleRangeB - The second rule to sort

@returns {number} A pointer to signify to the sort method how the currently in focus value should be sorted