1234567891011121314151617181920212223242526 |
- 'use strict';
- import { IdentifierNamesGenerator } from '../../src/enums/generators/identifier-names-generators/IdentifierNamesGenerator';
- (function () {
- const JavaScriptObfuscator: any = require('../../index');
- let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
- `
- // Paste your JavaScript code here
- function hi() {
- console.log("Hello World!");
- }
- hi();
- `,
- {
- compact: false,
- renameGlobals: true,
- identifierNamesGenerator: IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator,
- stringArray: true,
- rotateStringArray: false
- }
- ).getObfuscatedCode();
- console.log(obfuscatedCode);
- console.log(eval(obfuscatedCode));
- })();
|