index.js
function WooCommerceAPI(opt) {
  if (!(this instanceof WooCommerceAPI)) {
    return new WooCommerceAPI(opt);
  }

  opt = opt || {};

  if (!(opt.url)) {
    throw new Error('url is required');
  }

  if (!(opt.consumerKey)) {
    throw new Error('consumerKey is required');
  }

  if (!(opt.consumerSecret)) {
    throw new Error('consumerSecret is required');
  }

  this.classVersion = '1.4.2';
  this._setDefaultsOptions(opt);
}
function WooCommerceAPI(opt) {
  if (!(this instanceof WooCommerceAPI)) {
    return new WooCommerceAPI(opt);
  }

  opt = opt || {};

  if (!(opt.url)) {
    throw new Error('url is required');
  }

  if (!(opt.consumerKey)) {
    throw new Error('consumerKey is required');
  }

  if (!(opt.consumerSecret)) {
    throw new Error('consumerSecret is required');
  }

  this.classVersion = '1.4.2';
  this._setDefaultsOptions(opt);
}
function WooCommerceAPI ( opt ) { if ( ! ( this instanceof WooCommerceAPI ) ) { return new WooCommerceAPI ( opt ) ; } opt = opt || { } ; if ( ! ( opt . url ) ) { throw new Error ( 'url is required' ) ; } if ( ! ( opt . consumerKey ) ) { throw new Error ( 'consumerKey is required' ) ; } if ( ! ( opt . consumerSecret ) ) { throw new Error ( 'consumerSecret is required' ) ; } this . classVersion = '1.4.2' ; this . _setDefaultsOptions ( opt ) ; }
WooCommerce REST API wrapper

@param {Object} opt
WooCommerce REST API wrapper