title: Is it possible to use the javascript-obfuscator library on the browser?
body: <p>I am trying to obfuscate some javascript code using the following library:</p>
  <p><a href="https://github.com/javascript-obfuscator/javascript-obfuscator" rel="nofollow noreferrer">https://github.com/javascript-obfuscator/javascript-obfuscator</a></p>
  <p>I had success using Node.js but I would like it on the browser by simply calling the obfuscator methods from javascript.</p>
  <p>The documentation says:</p>
  <p>In a browser:</p>
  <p>From node_modules:</p>
  <pre><code>&lt;script src=&quot;./node_modules/javascript-obfuscator/dist/index.browser.js&quot;/&gt;
  </code></pre>
  <p>I have successfully installed the js-obfuscator library using NPM and added the above CDN code in the head section of my index.html</p>
  <p>At this point I don't know whether it is possible to instantiate the object jsObfuscator without using :</p>
  <pre><code>let JavaScriptObfuscator = require('javascript-obfuscator');
  </code></pre>
  <p>I am making a simple client side plugin which returns the obfuscated version of the code you input in. This runs as simple static page index.html, where I cannot use require.</p>
  <p>If I try and use the following function code, the jsObfuscator is not defined as I did not use the require method.</p>
  <pre><code>function obfuscation(data) {
    let obfuscationResult = jsObfuscator.obfuscate(data, {
      compact: true,
      controlFlowFlattening: true,
      deadCodeInjection: true,
      deadCodeInjectionThreshold: 0.4,
      reservedNames: [
        'setup',
        'draw'
      ],
      reservedStrings: [
        'setup',
        'draw'
      ],
      renameGlobals: true
    });
    return obfuscationResult;
  }
  </code></pre>
  <p>Do you know how and if it is possible to use the jsObfuscator library on the browser?</p>