function BreakpointHandler( opts ) {
  var hasRequiredArgs =
  Boolean( opts && opts.breakpoint && opts.enter && opts.leave );
  var breakpoint;

  if ( hasRequiredArgs === false ) {
    throw new Error( 'BreakpointHandler constructor requires arguments!' );
  }

  breakpoint = opts.breakpoint;
  this.match = false;
  this.type = opts.type || 'max';
  this.breakpoint = _breakpointsConfig[breakpoint] &&
                    _breakpointsConfig[breakpoint][this.type] ||
                    breakpoint;
  this.enter = opts.enter;
  this.leave = opts.leave;

  _init( this );
}
/**
 * BreakpointHandler
 * @class
 * @classdesc On window resize, checks viewport
 * width against a specified breakpoint value or range,
 * and calls `enter` or `leave` callback if breakpoint
 * region has just been entered or exited.
 *
 * @param {object} opts Options object. Takes form:
 * {
 *  breakpoint: number (600) or range [600, 1023],
 *  type:       range, max, or min (type of media query to emulate),
 *  enter:      callback when breakpoint region entered,
 *  leave:      callback when breakpoint region exited
 * }
 */
BreakpointHandler
@class
@classdesc On window resize, checks viewport
width against a specified breakpoint value or range,
and calls `enter` or `leave` callback if breakpoint
region has just been entered or exited.

@param {object} opts Options object.
BreakpointHandler @class @classdesc On window resize checks viewport width against a specified breakpoint value or range and calls ` enter ` or ` leave ` callback if breakpoint region has just been entered or exited . @param { object } opts Options object .
function BreakpointHandler( opts ) {
  var hasRequiredArgs =
  Boolean( opts && opts.breakpoint && opts.enter && opts.leave );
  var breakpoint;
  if ( hasRequiredArgs === false ) {
    throw new Error( 'BreakpointHandler constructor requires arguments!' );
  }
  breakpoint = opts.breakpoint;
  this.match = false;
  this.type = opts.type || 'max';
  this.breakpoint = _breakpointsConfig[breakpoint] &&
                    _breakpointsConfig[breakpoint][this.type] ||
                    breakpoint;
  this.enter = opts.enter;
  this.leave = opts.leave;
  _init( this );
}
function BreakpointHandler ( opts ) { var hasRequiredArgs = Boolean ( opts && opts . breakpoint && opts . enter && opts . leave ) ; var breakpoint ; if ( hasRequiredArgs === false ) { throw new Error ( 'BreakpointHandler constructor requires arguments!' ) ; } breakpoint = opts . breakpoint ; this . match = false ; this . type = opts . type || 'max' ; this . breakpoint = _breakpointsConfig [ breakpoint ] && _breakpointsConfig [ breakpoint ] [ this . type ] || breakpoint ; this . enter = opts . enter ; this . leave = opts . leave ; _init ( this ) ; }
BreakpointHandler
 @class
 @classdesc On window resize, checks viewport
 width against a specified breakpoint value or range,
 and calls `enter` or `leave` callback if breakpoint
 region has just been entered or exited.
BreakpointHandler @class @classdesc On window resize checks viewport width against a specified breakpoint value or range and calls ` enter ` or ` leave ` callback if breakpoint region has just been entered or exited .