src/util/range.js
/**
   * split current range by duration
   * @param {Duration} duration
   * @param {Boolean} remainder - keep the last range when range will be divided with remainder;
   * @return  {Array} Array of ranges
   */
split current range by duration
@param {Duration} duration
@param {Boolean} remainder - keep the last range when range will be divided with remainder;
@return  {Array} Array of ranges
split current range by duration @param { Duration } duration @param { Boolean } remainder - keep the last range when range will be divided with remainder ; @return { Array } Array of ranges
split(duration, remainder) {
    let ranges = [];
    if (!duration || duration.valueOf() === 0) {
      return ranges;
    }
    for(let start = Duration(); start.valueOf() < this._duration.valueOf(); start.add(duration)) {
      if (remainder || start.valueOf() +  duration.valueOf() <= this._duration.valueOf()){
        ranges.push(new Range(this._moment.clone().add(start), duration));
      }
    }
    return ranges;
  }
split ( duration , remainder ) { let ranges = [ ] ; if ( ! duration || duration . valueOf ( ) === 0 ) { return ranges ; } for ( let start = Duration ( ) ; start . valueOf ( ) < this . _duration . valueOf ( ) ; start . add ( duration ) ) { if ( remainder || start . valueOf ( ) + duration . valueOf ( ) <= this . _duration . valueOf ( ) ) { ranges . push ( new Range ( this . _moment . clone ( ) . add ( start ) , duration ) ) ; } } return ranges ; }
split current range by duration
 @param {Duration} duration
 @param {Boolean} remainder - keep the last range when range will be divided with remainder;
 @return  {Array} Array of ranges
split current range by duration @param { Duration } duration @param { Boolean } remainder - keep the last range when range will be divided with remainder ; @return { Array } Array of ranges