1234567891011121314151617181920212223242526272829303132 |
- 'use strict';
- import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNodes';
- (function () {
- const JavaScriptObfuscator: any = require('../../index');
- let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
- `
- function a (a, b) {
-
- }
-
- function b (b, c) {
-
- }
- `,
- {
- ...NO_ADDITIONAL_NODES_PRESET,
- compact: false,
- identifierNamesGenerator: 'mangled',
- identifiersPrefix: 'a',
- transformObjectKeys: true,
- stringArray: true,
- stringArrayThreshold: 1,
- log: true
- }
- ).getObfuscatedCode();
- console.log(obfuscatedCode);
- console.log(eval(obfuscatedCode));
- })();
|