lib/minimize.js
function Minimize(parser, options) {
  if ('object' !== typeof options) {
    options = parser || {};
    options.dom = options.dom || {};
    parser = void 0;
  }

  this.emits = emits;
  this.plugins = Object.create(null);
  this.helpers = new Helpers(options);

  //
  // Prepare the parser.
  //
  this.htmlparser = parser || new html.Parser(
    new html.DomHandler(this.emits('read')),
    options.dom
  );

  //
  // Register plugins.
  //
  this.plug(options.plugins);
}
function Minimize(parser, options) {
  if ('object' !== typeof options) {
    options = parser || {};
    options.dom = options.dom || {};
    parser = void 0;
  }

  this.emits = emits;
  this.plugins = Object.create(null);
  this.helpers = new Helpers(options);

  //
  // Prepare the parser.
  //
  this.htmlparser = parser || new html.Parser(
    new html.DomHandler(this.emits('read')),
    options.dom
  );

  //
  // Register plugins.
  //
  this.plug(options.plugins);
}
function Minimize ( parser , options ) { if ( 'object' !== typeof options ) { options = parser || { } ; options . dom = options . dom || { } ; parser = void 0 ; } this . emits = emits ; this . plugins = Object . create ( null ) ; this . helpers = new Helpers ( options ) ; // // Prepare the parser. // this . htmlparser = parser || new html . Parser ( new html . DomHandler ( this . emits ( 'read' ) ) , options . dom ) ; // // Register plugins. // this . plug ( options . plugins ) ; }
Minimizer constructor.

@Constructor
@param {Function} parser HTMLParser2 instance, i.e. to support SVG if required.
@param {Object} options parsing options, optional
@api public
Minimizer constructor .