var _ = require('lodash');

/**
 * Create new base Mailer instance
 * @param {Object} _config Additional configuration
 * @constructor
 */
function BaseMailer(_config) {
  this._config = {};

  _.forOwn(_config, function (value, key) {
    this.set(key, value);
  }.bind(this));
}

/**
 * Get configuration value
 * @param {String} [path]
 * @returns {*}
 */
BaseMailer.prototype.get = function (path) {
  return typeof path === 'undefined' ? this._config : _.get(this._config, path);
};

/**
 * Set new configuration value
 * @param {String} path
 * @param {*} value
 * @returns {BaseMailer}
 */
BaseMailer.prototype.set = function (path, value) {
  _.set(this._config, path, value);
  return this;
};

/**
 * Returns transporter
 * @returns {*}
 */
BaseMailer.prototype.getTransporter = function () {
  return this._transporter;
};

/**
 * Set new transporter
 * @param transporter
 * @returns {BaseMailer}
 */
BaseMailer.prototype.setTransporter = function (transporter) {
  this._transporter = transporter;
  return this;
};

BaseMailer.prototype.send = _;

module.exports = BaseMailer;

@@ -1,28 +1,26 @@
-var _ = require(
+import _ from 
 'lodash'
 );%0A%0A
@@ -19,141 +19,57 @@
 ash'
-)
 ;%0A%0A
-/**%0A * Create new b
+export default class B
 ase
- 
 Mailer 
-instance%0A * @param %7BObject%7D _config Additional configuration%0A * @constructor%0A */%0Afunction BaseMaile
+%7B%0A  constructo
 r(_c
@@ -73,24 +73,26 @@
 (_config) %7B%0A
+  
   this._conf
@@ -104,103 +104,84 @@
 %7B%7D;%0A
-%0A
   
-_.forOwn(_config, function (value, key) %7B%0A    this.set(key, value);%0A  %7D.bind(this));%0A%7D%0A%0A
+  this._provider = %7B%7D;%0A%0A    _.assign(this._config, _config);%0A  %7D%0A%0A  
 /**%0A
+  
  * G
@@ -195,32 +195,34 @@
 iguration value%0A
+  
  * @param %7BStrin
@@ -231,16 +231,18 @@
  %5Bpath%5D%0A
+  
  * @retu
@@ -253,48 +253,19 @@
 %7B*%7D%0A
+  
  */%0A
-BaseMailer.prototype.get = function 
+  get
 (pat
@@ -267,24 +267,26 @@
 t(path) %7B%0A  
+ 
+ 
 return typeo
@@ -352,24 +352,29 @@
  path);%0A
-%7D;%0A%0A
+  %7D%0A%0A  
 /**%0A
+  
  * Set n
@@ -392,24 +392,26 @@
 ation value%0A
+  
  * @param %7BS
@@ -422,16 +422,18 @@
 g%7D path%0A
+  
  * @para
@@ -444,16 +444,18 @@
 %7D value%0A
+  
  * @retu
@@ -475,48 +475,19 @@
 er%7D%0A
+  
  */%0A
-BaseMailer.prototype.set = function 
+  set
 (pat
@@ -498,16 +498,18 @@
 alue) %7B%0A
+  
   _.set(
@@ -536,16 +536,18 @@
 value);%0A
+  
   return
@@ -553,24 +553,29 @@
 n this;%0A
-%7D;%0A%0A
+  %7D%0A%0A  
 /**%0A
+  
  * Retur
@@ -577,28 +577,27 @@
 Returns 
-transport
+provid
 er%0A
+  
  * @retu
@@ -608,64 +608,34 @@
 %7B*%7D%0A
+  
  */%0A
-BaseMailer.prototype.getTransporter = function 
+  getProvider
 () %7B%0A
+  
   re
@@ -649,29 +649,31 @@
 is._
-transporter;%0A%7D;%0A%0A
+provider;%0A  %7D%0A%0A  
 /**%0A
+  
  * S
@@ -679,28 +679,27 @@
 Set new 
-transport
+provid
 er%0A
+  
  * @para
@@ -704,20 +704,19 @@
 ram 
-transport
+provid
 er%0A
+  
  * @
@@ -740,83 +740,50 @@
 er%7D%0A
+  
  */%0A
-BaseMailer.prototype.setTransporter = function (transport
+  setProvider(provid
 er) %7B%0A
+  
   this._
 tran
@@ -782,37 +782,33 @@
 is._
-transporter = transport
+provider = provid
 er;%0A  
+ 
+ 
 retu
@@ -820,69 +820,10 @@
 is;%0A
-%7D;%0A%0ABaseMailer.prototype.send = _;%0A%0Amodule.exports = BaseMailer;
+  %7D%0A%7D
 %0A

Rewrite BaseMailer with ES6