docs: function(value, compareFunction) {
      var low = 0;
      var high = this.length;
      var mid;
  
      if (compareFunction) {
        while (low < high) {
          mid = low + high >>> 1;
          var direction = compareFunction(this[mid], value);
          if (!direction) {
            return mid;
          }
          if (direction < 0) {
            low = mid + 1;
          } else {
            high = mid;
          }
        }
      } else {
        while (low < high) {
          mid = low + high >>> 1;
          if (this[mid] === value) {
            return mid;
          }
          if (this[mid] < value) {
            low = mid + 1;
          } else {
            high = mid;
          }
        }
      }
  
      return -1;
    }