index.js
function () {
    if (beatmap.Tags) {
      beatmap.tagsArray = beatmap.Tags.split(' ');
    }

    eventsLines.forEach(parseEvent);
    beatmap.breakTimes.sort(function (a, b) { return (a.startTime > b.startTime ? 1 : -1); });

    timingLines.forEach(parseTimingPoint);
    beatmap.timingPoints.sort(function (a, b) { return (a.offset > b.offset ? 1 : -1); });

    var timingPoints = beatmap.timingPoints;

    for (var i = 1, l = timingPoints.length; i < l; i++) {
      if (!timingPoints[i].hasOwnProperty('bpm')) {
        timingPoints[i].beatLength = timingPoints[i - 1].beatLength;
        timingPoints[i].bpm        = timingPoints[i - 1].bpm;
      }
    }

    objectLines.forEach(parseHitObject);
    beatmap.hitObjects.sort(function (a, b) { return (a.startTime > b.startTime ? 1 : -1); });

    computeMaxCombo();
    computeDuration();

    return beatmap;
  }
function () {
    if (beatmap.Tags) {
      beatmap.tagsArray = beatmap.Tags.split(' ');
    }

    eventsLines.forEach(parseEvent);
    beatmap.breakTimes.sort(function (a, b) { return (a.startTime > b.startTime ? 1 : -1); });

    timingLines.forEach(parseTimingPoint);
    beatmap.timingPoints.sort(function (a, b) { return (a.offset > b.offset ? 1 : -1); });

    var timingPoints = beatmap.timingPoints;

    for (var i = 1, l = timingPoints.length; i < l; i++) {
      if (!timingPoints[i].hasOwnProperty('bpm')) {
        timingPoints[i].beatLength = timingPoints[i - 1].beatLength;
        timingPoints[i].bpm        = timingPoints[i - 1].bpm;
      }
    }

    objectLines.forEach(parseHitObject);
    beatmap.hitObjects.sort(function (a, b) { return (a.startTime > b.startTime ? 1 : -1); });

    computeMaxCombo();
    computeDuration();

    return beatmap;
  }
function ( ) { if ( beatmap . Tags ) { beatmap . tagsArray = beatmap . Tags . split ( ' ' ) ; } eventsLines . forEach ( parseEvent ) ; beatmap . breakTimes . sort ( function ( a , b ) { return ( a . startTime > b . startTime ? 1 : - 1 ) ; } ) ; timingLines . forEach ( parseTimingPoint ) ; beatmap . timingPoints . sort ( function ( a , b ) { return ( a . offset > b . offset ? 1 : - 1 ) ; } ) ; var timingPoints = beatmap . timingPoints ; for ( var i = 1 , l = timingPoints . length ; i < l ; i ++ ) { if ( ! timingPoints [ i ] . hasOwnProperty ( 'bpm' ) ) { timingPoints [ i ] . beatLength = timingPoints [ i - 1 ] . beatLength ; timingPoints [ i ] . bpm = timingPoints [ i - 1 ] . bpm ; } } objectLines . forEach ( parseHitObject ) ; beatmap . hitObjects . sort ( function ( a , b ) { return ( a . startTime > b . startTime ? 1 : - 1 ) ; } ) ; computeMaxCombo ( ) ; computeDuration ( ) ; return beatmap ; }
Compute everything that require the file to be completely parsed and return the beatmap
@return {Object} beatmap
Compute everything that require the file to be completely parsed and return the beatmap