src/Interval.js
function(that) {
    if (this.sourceString !== that.sourceString) {
      throw errors.intervalSourcesDontMatch();
    }
    assert(this.startIdx >= that.startIdx && this.endIdx <= that.endIdx,
           'other interval does not cover this one');
    return new Interval(this.sourceString,
                        this.startIdx - that.startIdx,
                        this.endIdx - that.startIdx);
  }
function(that) {
    if (this.sourceString !== that.sourceString) {
      throw errors.intervalSourcesDontMatch();
    }
    assert(this.startIdx >= that.startIdx && this.endIdx <= that.endIdx,
           'other interval does not cover this one');
    return new Interval(this.sourceString,
                        this.startIdx - that.startIdx,
                        this.endIdx - that.startIdx);
  }
function ( that ) { if ( this . sourceString !== that . sourceString ) { throw errors . intervalSourcesDontMatch ( ) ; } assert ( this . startIdx >= that . startIdx && this . endIdx <= that . endIdx , 'other interval does not cover this one' ) ; return new Interval ( this . sourceString , this . startIdx - that . startIdx , this . endIdx - that . startIdx ) ; }
Returns a new Interval that has the same extent as this one, but which is relative to `that`, an Interval that fully covers this one.
Returns a new Interval that has the same extent as this one but which is relative to that an Interval that fully covers this one .