code: function resolveRangeBound(bound, opts, isStop, includeStop) {
    var result;
    if (isUndefined(bound)) {
      return isStop ? opts.maxLen : 0;
    }
    var useIntIndexing = (
      opts.resolveMode === RESOLVE_MODE.INT ||
      (opts.resolveMode === RESOLVE_MODE.COL && typeof bound === 'number')
    );
    if (includeStop === null) {
      includeStop = useIntIndexing ? false : true;
    }
    if (useIntIndexing) {
      result = resolveIntIdx(bound, opts.maxLen, false);
      return (isStop && includeStop) ? result + 1 : result;
    } else {
      if (opts.index.arity === 1) {
        result = opts.index.lookupKey([bound]);
        if (result === null) {
          throw new Error('could not find entry for range bound: ' + bound);
        } else if (typeof result === 'number') {
          return (isStop && includeStop) ? result + 1 : result;
        } else {
          return (isStop && includeStop) ?
            result[result.length - 1] + 1 :
            result[0];
        }
      } else {
        // TODO
        throw new Error('unimplemented case (TODO)');
      }
    }
  }
docs: Returns the resolved integer index for the bound