code: function (int) {
    var map = interval.isPerfect(int.number) ? perfectOffsets : majorOffsets;
    var key = _.invert(map)[int.quality];
  
    return parseInt(key, 10);
  }
docs: Find the number of half steps between interval and corresponding diatonic interval