dev-compile-performance.ts 426 B

12345678910111213141516171819
  1. 'use strict';
  2. import * as fs from 'fs';
  3. if (!(<any>global)._babelPolyfill) {
  4. require('babel-polyfill');
  5. }
  6. (function () {
  7. const JavaScriptObfuscator: any = require("../../index");
  8. let start: any = new Date();
  9. JavaScriptObfuscator.obfuscate(
  10. fs.readFileSync('test/fixtures/compile-performance.js', 'utf8')
  11. ).getObfuscatedCode();
  12. console.log(`Total time: ${<any>new Date() - start}`);
  13. })();