btoa light converter

by Konstantin Cryman

JavaScript

var _script = `
(function(  ){

  function customScript( obj ){
  	this.obj = obj;
  }
  
  customScript.prototype.hello = function(){
  	console.log( 'hello:', this.obj );
  }
  
  return customScript;
})();
`

console.log( _script );

console.log( btoa(_script) );

var scriptIniter = new ( eval( _script ) )( { abc: 1, def: 2 } );

console.log( scriptIniter );