title: How to hide library source code in Google way?
body: <p>For instance, I have a <a href="https://developers.google.com/apps-script/guide_libraries" rel="nofollow">library</a> and I would like to protect the source code to being viewed. The first method that comes to mind is to create public wrappers for private functions like the following</p>
  
  <pre><code>function executeMyCoolFunction(param1, param2, param3) {
    return executeMyCoolFunction_(param1, param2, param3);
  }
  </code></pre>
  
  <p>Only public part of the code will be visible in this way. It is fine, but all Google Service functions look like <code>function abs() {/* */}</code>. I am curious, is there an approach to hide library source code like Google does?</p>
  
  <p><strong>Edit 00:</strong> Do not "hide" a library code by using another library, i.e. the LibA with known project key uses the LibB with unknown project key. The public functions code of LibB is possible to get and even execute them. The code is</p>
  
  <pre><code>function exploreLib_(lib, libName) {
    if (libName == null) {
      for (var name in this) {
        if (this[name] == lib) {
          libName = name;
        }
      }
    }
    var res = [];
    for (var entity in lib) {
      var obj = lib[entity];
      var code;
      if (obj["toSource"] != null) {
        code = obj.toSource();
      }
      else if (obj["toString"] != null) {
        code = obj.toString();
      }
      else {
        var nextLibCode = exploreLib_(obj, libName + "." + entity);
        res = res.concat(nextLibCode);
      }
      if (code != null) {
        res.push({ libraryName: libName, functionCode: code });
      }
    }
    return res;
  }
  
  function explorerLibPublicFunctionsCode() {
    var lstPublicFunctions = exploreLib_(LibA);
    var password = LibA.LibB.getPassword();
  }
  </code></pre>