var _ = require('lodash');

/**
 * Create base instance for SMS
 * @param {Object} [_config]
 * @constructor
 */
function BaseSms(_config) {
  this._config = {};

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

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

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

/**
 * Get provider for sending notifications
 * @returns {*}
 */
BaseSms.prototype.getProvider = function () {
  return this._provider;
};

/**
 * Set new provider to this pusher
 * @param {*} provider
 * @returns {BaseSms}
 */
BaseSms.prototype.setProvider = function (provider) {
  this._provider = provider;
  return this;
};

BaseSms.prototype.send = _;

module.exports = BaseSms;

@@ -1,28 +1,26 @@
-var _ = require(
+import _ from 
 'lodash'
 );%0A%0A
@@ -19,113 +19,55 @@
 ash'
-)
 ;%0A%0A
-/**%0A * Create base instance for SMS%0A * @param %7BObject%7D %5B_config%5D%0A * @constructor%0A */%0Afunction BaseSms
+export default class BaseSms %7B%0A  constructor
 (_co
@@ -70,24 +70,26 @@
 (_config) %7B%0A
+  
   this._conf
@@ -101,103 +101,84 @@
 %7B%7D;%0A
-%0A
   
-_.forOwn(_config, function (value, key) %7B%0A    this.set(key, value);%0A  %7D.bind(this)
+  this._provider = %7B%7D;%0A%0A    _.assign(this._config, _config
 );%0A
+  
 %7D%0A%0A
+  
 /**%0A
+  
  * G
@@ -192,32 +192,34 @@
 iguration value%0A
+  
  * @param %7BStrin
@@ -228,16 +228,18 @@
  %5Bpath%5D%0A
+  
  * @retu
@@ -250,45 +250,19 @@
 %7B*%7D%0A
+  
  */%0A
-BaseSms.prototype.get = function 
+  get
 (pat
@@ -262,24 +262,26 @@
 get(path) %7B%0A
+  
   return typ
@@ -349,24 +349,29 @@
  path);%0A
-%7D;%0A%0A
+  %7D%0A%0A  
 /**%0A
+  
  * Set c
@@ -385,24 +385,26 @@
 ation value%0A
+  
  * @param %7BS
@@ -415,16 +415,18 @@
 g%7D path%0A
+  
  * @para
@@ -437,16 +437,18 @@
 %7D value%0A
+  
  * @retu
@@ -465,45 +465,19 @@
 ms%7D%0A
+  
  */%0A
-BaseSms.prototype.set = function 
+  set
 (pat
@@ -488,16 +488,18 @@
 alue) %7B%0A
+  
   _.set(
@@ -526,16 +526,18 @@
 value);%0A
+  
   return
@@ -543,24 +543,29 @@
 n this;%0A
-%7D;%0A%0A
+  %7D%0A%0A  
 /**%0A
+  
  * Get p
@@ -598,16 +598,18 @@
 cations%0A
+  
  * @retu
@@ -620,58 +620,34 @@
 %7B*%7D%0A
+  
  */%0A
-BaseSms.prototype.getProvider = function 
+  getProvider
 () %7B%0A
+  
   re
@@ -671,16 +671,21 @@
 er;%0A
-%7D;%0A%0A
+  %7D%0A%0A  
 /**%0A
+  
  * S
@@ -715,16 +715,18 @@
  pusher%0A
+  
  * @para
@@ -740,16 +740,18 @@
 rovider%0A
+  
  * @retu
@@ -768,53 +768,27 @@
 ms%7D%0A
+  
  */%0A
-BaseSms.prototype.setProvider = function 
+  setProvider
 (pro
@@ -796,16 +796,18 @@
 ider) %7B%0A
+  
   this._
@@ -827,16 +827,18 @@
 ovider;%0A
+  
   return
@@ -848,63 +848,10 @@
 is;%0A
-%7D;%0A%0ABaseSms.prototype.send = _;%0A%0Amodule.exports = BaseSms;
+  %7D%0A%7D
 %0A

Rewrite BaseSms with ES6