lib/recurrify.js
/**
   * Returns a function to use when comparing two dates. Encapsulates the
   * difference between searching for instances forward and backwards so that
   * the same code can be completely reused for both directions.
   *
   * @param {String} dir: The direction to use, either 'next' or 'prev'
   */
Returns a function to use when comparing two dates. Encapsulates the
difference between searching for instances forward and backwards so that
the same code can be completely reused for both directions.

@param {String} dir: The direction to use, either 'next' or 'prev'
Returns a function to use when comparing two dates . Encapsulates the difference between searching for instances forward and backwards so that the same code can be completely reused for both directions . @param { String } dir : The direction to use either ' next ' or ' prev '
function compareFn (dir) {
    return dir === 'next'
      ? function (a, b) {
        return a.getTime() > b.getTime()
      }
      : function (a, b) {
        return b.getTime() > a.getTime()
      }
  }
function compareFn ( dir ) { return dir === 'next' ? function ( a , b ) { return a . getTime ( ) > b . getTime ( ) } : function ( a , b ) { return b . getTime ( ) > a . getTime ( ) } }
Returns a function to use when comparing two dates.
Returns a function to use when comparing two dates .