[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3840":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":15,"starSnapshotCount":15,"syncStatus":47,"lastSyncTime":48,"discoverSource":49},3840,"javascript-obfuscator","javascript-obfuscator\u002Fjavascript-obfuscator","A powerful obfuscator for JavaScript and Node.js","https:\u002F\u002Fobfuscator.io",null,"TypeScript",16103,1728,184,34,0,5,19,78,17,44.71,"BSD 2-Clause \"Simplified\" License",false,"master",[25,26,27,28,29,30,31,5,32,33,34,35,36,37,38,39,40,41,42,43],"browser","control-flow","cryptography","encoding","flattening","flow","javascript","js-obfuscator","literal","mangle","nodejs","obfuscate","obfuscation","obfuscator","protection","security","string","typescript","uglify","2026-06-12 02:00:55","\u003C!--\n  Title: JavaScript Obfuscator\n  Description: A powerful obfuscator for JavaScript and Node.js.\n  Author: Timofei Kachalov\n  -->\n\n# JavaScript obfuscator\n\n![logo](https:\u002F\u002Fraw.githubusercontent.com\u002Fjavascript-obfuscator\u002Fjavascript-obfuscator\u002Fmaster\u002Fimages\u002Flogo.png)\n\n---\n\n### Do you use JavaScript Obfuscator at your company?\n\nJavaScript Obfuscator has reached over **1 million npm downloads per week**. I am currently preparing an **EB-1 immigration case** and collecting independent evidence of the project’s real-world professional usage and impact.\n\nIf you use JavaScript Obfuscator in a company project — especially at a well-known company, large organization, or widely used product — I would be very grateful if you could contact me.\n\nHelpful evidence may include a brief confirmation or, ideally, a 1–2 page reference letter describing:\n\n- how your team or company used JavaScript Obfuscator;\n- why you chose it;\n- what problem it helped solve;\n- whether it was used in production or an important internal workflow;\n- your role and how you are familiar with the usage.\n\nI can provide a simple draft\u002Ftemplate to make this easy.\n\nPlease contact me at: **referenceletter@obfuscator.io**\n\nThank you for supporting the project.\n\n---\n\n### :rocket: Obfuscator.io with VM Obfuscation\n\n**Obfuscator.io** adds **VM-based bytecode obfuscation** to this package - your JavaScript functions are compiled to custom bytecode that runs on an embedded virtual machine. Each build produces unique opcodes and VM structure, making reverse engineering and automated deobfuscation dramatically harder.\n\n| Protection goal | Free (this package)                                                               | [obfuscator.io](https:\u002F\u002Fobfuscator.io)                                                                                                                                                                        |\n| --- |-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Rename identifiers | ✅ variable\u002Ffunction renaming                                                      | ✅ + VM-local symbols never exposed as JavaScript                                                                                                                                                              |\n| Obscure strings | ✅ string array + base64\u002Frc4 | ✅ + strings embedded in bytecode constants                                                                                                                                                                    |\n| Obscure control flow | ✅ control flow flattening | ✅ full bytecode virtualization, [`vmJumpsEncoding`](#vmjumpsencoding) (runtime-computed jump targets), [`vmDeadCodeInjection`](#vmdeadcodeinjection) (fake bytecode sequences)                                |\n| Resist decompilation | ⚠️ output is still JavaScript | ✅ custom opcodes, [`vmStatefulOpcodes`](#vmstatefulopcodes) (position-dependent opcode mapping), [`vmMacroOps`](#vmmacroops) (fused instructions), [`vmDecoyOpcodes`](#vmdecoyopcodes) (fake opcode handlers) |\n| Resist automated LLM-based analysis | ❌ fully vulnerable (no LLM-specific defenses) | ✅ bytecode encryption + anti-LLM defenses in [`vmSelfDefending`](#vmselfdefending) and [`vmDebugProtection`](#vmdebugProtection)                                                                              |\n| Encryption | ✅ [`stringArrayEncoding`](#stringarrayencoding) (base64\u002Frc4 on extracted strings) | ✅ [`vmBytecodeEncoding`](#vmbytecodeencoding) (per-instruction encoding), [`vmBytecodeArrayEncoding`](#vmbytecodeArrayEncoding) (whole bytecode array as single block)                                        |\n| Anti-debugging | ✅ `debugProtection` (freezes browser DevTools) | ✅ [`vmDebugProtection`](#vmdebugProtection) (multi-layered anti-debugging and anti-analysis defenses)                                                                                                         |\n| Tamper detection | ✅ `selfDefending` (breaks if beautified) | ✅ [`vmSelfDefending`](#vmselfdefending) (multi-layered tamper detection, anti-hooking, anti-reverse-engineering protection)                                                                                   |\n| Runs offline, no network | ✅ | ❌ uses obfuscator.io API (requires token)                                                                                                                                                                     |\n\n[Visit Obfuscator.io](https:\u002F\u002Fobfuscator.io) · [Pro API methods](#shield-pro-api-methods-vm-obfuscation)\n\nThis package provides access to Obfuscator.io API via CLI and Node.js API.\n\n---\n\nJavaScript Obfuscator is a powerful free obfuscator for JavaScript, containing a variety of features which provide protection for your source code.\n\n**Key features:**\n- VM bytecode obfuscation (via [Obfuscator.io](https:\u002F\u002Fobfuscator.io\u002F))\n- variables renaming\n- strings extraction and encryption\n- dead code injection\n- control flow flattening\n- various code transformations\n- and [more](#javascript-obfuscator-options)...\n\nThe example of obfuscated code: [github.com](https:\u002F\u002Fgithub.com\u002Fjavascript-obfuscator\u002Fjavascript-obfuscator\u002Fblob\u002Fmaster\u002Fexamples\u002Fjavascript-obfuscator.js)\n\n#### Online version:\n[obfuscator.io](https:\u002F\u002Fobfuscator.io)\n\n#### Plugins:\n* Webpack plugin: [webpack-obfuscator](https:\u002F\u002Fgithub.com\u002Fjavascript-obfuscator\u002Fwebpack-obfuscator)\n* Webpack loader: [obfuscator-loader](https:\u002F\u002Fgithub.com\u002Fjavascript-obfuscator\u002Fobfuscator-loader)\n* Gulp: [gulp-javascript-obfuscator](https:\u002F\u002Fgithub.com\u002Fjavascript-obfuscator\u002Fgulp-javascript-obfuscator)\n* Grunt: [grunt-contrib-obfuscator](https:\u002F\u002Fgithub.com\u002Fjavascript-obfuscator\u002Fgrunt-contrib-obfuscator)\n* Rollup: [rollup-plugin-javascript-obfuscator](https:\u002F\u002Fgithub.com\u002Fjavascript-obfuscator\u002Frollup-plugin-javascript-obfuscator)\n* Weex: [weex-devtool](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fweex-devtool)\n* Malta: [malta-js-obfuscator](https:\u002F\u002Fgithub.com\u002Ffedeghe\u002Fmalta-js-obfuscator)\n* Netlify plugin: [netlify-plugin-js-obfuscator](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fnetlify-plugin-js-obfuscator)\n* Snowpack plugin: [snowpack-javascript-obfuscator](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fsnowpack-javascript-obfuscator)\n* Vite plugin: [vite-plugin-bundle-obfuscator](https:\u002F\u002Fgithub.com\u002Fz0ffy\u002Fvite-plugin-bundle-obfuscator)\n\n[![npm version](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002Fjavascript-obfuscator.svg)](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002Fjavascript-obfuscator)\n[![FOSSA Status](https:\u002F\u002Fapp.fossa.io\u002Fapi\u002Fprojects\u002Fgit%2Bgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator.svg?type=shield)](https:\u002F\u002Fapp.fossa.io\u002Fprojects\u002Fgit%2Bgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator?ref=badge_shield)\n![Build Status](https:\u002F\u002Fgithub.com\u002Fjavascript-obfuscator\u002Fjavascript-obfuscator\u002Fworkflows\u002FJavaScript%20Obfuscator%20CI\u002Fbadge.svg)\n[![Coverage Status](https:\u002F\u002Fcoveralls.io\u002Frepos\u002Fgithub\u002Fjavascript-obfuscator\u002Fjavascript-obfuscator\u002Fbadge.svg)](https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Fjavascript-obfuscator\u002Fjavascript-obfuscator)\n[![Backers on Open Collective](https:\u002F\u002Fopencollective.com\u002Fjavascript-obfuscator\u002Fbackers\u002Fbadge.svg)](#backers) \n[![Sponsors on Open Collective](https:\u002F\u002Fopencollective.com\u002Fjavascript-obfuscator\u002Fsponsors\u002Fbadge.svg)](#sponsors)\n[![xscode](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAvailable%20on-xs%3Acode-blue?style=?style=plastic&logo=appveyor&logo=data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF\u002F\u002F\u002F\u002F\u002F\u002F\u002F\u002FVXz1bAAAAAJ0Uk5T\u002FwDltzBKAAAAlUlEQVR42uzXSwqAMAwE0Mn9L+3Ggtgkk35QwcnSJo9S+yGwM9DCooCbgn4YrJ4CIPUcQF7\u002FXSBbx2TEz4sAZ2q1RAECBAiYBlCtvwN+KiYAlG7UDGj59MViT9hOwEqAhYCtAsUZvL6I6W8c2wcbd+LIWSCHSTeSAAECngN4xxIDSK9f4B9t377Wd7H5Nt7\u002FXz8eAgwAvesLRjYYPuUAAAAASUVORK5CYII=)](https:\u002F\u002Fxscode.com\u002Fsanex3339\u002Fjavascript-obfuscator)\n\n#### *NOTE! the README on the master branch might not match that of the latest stable release!*\n\n#### If you have a question, check this section first: [FAQ](#frequently-asked-questions)\n\n## :warning: Important\n##### Only obfuscate the code that belongs to you. \n\nIt is not recommended to obfuscate vendor scripts and polyfills, since the obfuscated code is 15-80% slower (depends on options) and the files are significantly larger.\n\n## Installation\n\n#### Using Yarn or NPM\n\nInstall the package with Yarn or NPM and add it to your `dependencies` or `devDependencies`:\n\n```sh\n$ yarn add --dev javascript-obfuscator\n```\nor\n```sh\n$ npm install --save-dev javascript-obfuscator\n```\n\n#### In a Browser\n\nFrom CDN:\n\n```html\n\u003Cscript src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fjavascript-obfuscator\u002Fdist\u002Findex.browser.js\">\u003C\u002Fscript>\n```\n\nFrom `node_modules`:\n\n```html\n\u003Cscript src=\".\u002Fnode_modules\u002Fjavascript-obfuscator\u002Fdist\u002Findex.browser.js\">\u003C\u002Fscript>\n```\n\n## Usage\n\n```javascript\nvar JavaScriptObfuscator = require('javascript-obfuscator');\n\nvar obfuscationResult = JavaScriptObfuscator.obfuscate(\n    `\n        (function(){\n            var variable1 = '5' - 3;\n            var variable2 = '5' + 3;\n            var variable3 = '5' + - '2';\n            var variable4 = ['10','10','10','10','10'].map(parseInt);\n            var variable5 = 'foo ' + 1 + 1;\n            console.log(variable1);\n            console.log(variable2);\n            console.log(variable3);\n            console.log(variable4);\n            console.log(variable5);\n        })();\n    `,\n    {\n        compact: false,\n        controlFlowFlattening: true,\n        controlFlowFlatteningThreshold: 1,\n        numbersToExpressions: true,\n        simplify: true,\n        stringArrayShuffle: true,\n        splitStrings: true,\n        stringArrayThreshold: 1\n    }\n);\n\nconsole.log(obfuscationResult.getObfuscatedCode());\n\u002F*\nvar _0x9947 = [\n    'map',\n    'log',\n    'foo\\x20',\n    'bvmqO',\n    '133039ViRMWR',\n    'xPfLC',\n    'ytpdx',\n    '1243717qSZCyh',\n    '2|7|4|6|9|',\n    '1ErtbCr',\n    '1608314VKvthn',\n    '1ZRaFKN',\n    'XBoAA',\n    '423266kQOYHV',\n    '3|0|5|8|1',\n    '235064xPNdKe',\n    '13RUDZfG',\n    '157gNPQGm',\n    '1639212MvnHZL',\n    'rDjOa',\n    'iBHph',\n    '9926iRHoRl',\n    'split'\n];\nfunction _0x33e4(_0x1809b5, _0x37ef6e) {\n    return _0x33e4 = function (_0x338a69, _0x39ad79) {\n        _0x338a69 = _0x338a69 - (0x1939 + -0xf * 0x1f3 + 0x1 * 0x469);\n        var _0x2b223a = _0x9947[_0x338a69];\n        return _0x2b223a;\n    }, _0x33e4(_0x1809b5, _0x37ef6e);\n}\n(function (_0x431d87, _0x156c7f) {\n    var _0x10cf6e = _0x33e4;\n    while (!![]) {\n        try {\n            var _0x330ad1 = -parseInt(_0x10cf6e(0x6c)) * -parseInt(_0x10cf6e(0x6d)) + -parseInt(_0x10cf6e(0x74)) * -parseInt(_0x10cf6e(0x78)) + parseInt(_0x10cf6e(0x6a)) + -parseInt(_0x10cf6e(0x70)) + parseInt(_0x10cf6e(0x6e)) * -parseInt(_0x10cf6e(0x75)) + parseInt(_0x10cf6e(0x72)) + -parseInt(_0x10cf6e(0x67)) * parseInt(_0x10cf6e(0x73));\n            if (_0x330ad1 === _0x156c7f)\n                break;\n            else\n                _0x431d87['push'](_0x431d87['shift']());\n        } catch (_0x9f878) {\n            _0x431d87['push'](_0x431d87['shift']());\n        }\n    }\n}(_0x9947, -0xb6270 + 0x4dfd2 * 0x2 + 0x75460 * 0x2), function () {\n    var _0x1f346d = _0x33e4, _0x860db8 = {\n            'ytpdx': _0x1f346d(0x6b) + _0x1f346d(0x71),\n            'bvmqO': function (_0x560787, _0x519b9e) {\n                return _0x560787 - _0x519b9e;\n            },\n            'rDjOa': function (_0x4501fe, _0x2b07a3) {\n                return _0x4501fe + _0x2b07a3;\n            },\n            'xPfLC': function (_0x5f3c9b, _0x434936) {\n                return _0x5f3c9b + _0x434936;\n            },\n            'XBoAA': function (_0x535b8a, _0x42eef4) {\n                return _0x535b8a + _0x42eef4;\n            },\n            'iBHph': _0x1f346d(0x65)\n        }, _0x346c55 = _0x860db8[_0x1f346d(0x69)][_0x1f346d(0x79)]('|'), _0x3bf817 = 0x4bb * 0x1 + 0x801 + -0xcbc;\n    while (!![]) {\n        switch (_0x346c55[_0x3bf817++]) {\n        case '0':\n            console[_0x1f346d(0x7b)](_0x4c96d8);\n            continue;\n        case '1':\n            console[_0x1f346d(0x7b)](_0x101028);\n            continue;\n        case '2':\n            var _0x65977d = _0x860db8[_0x1f346d(0x66)]('5', -0x586 + -0x2195 + -0x6 * -0x685);\n            continue;\n        case '3':\n            console[_0x1f346d(0x7b)](_0x65977d);\n            continue;\n        case '4':\n            var _0x56d39b = _0x860db8[_0x1f346d(0x76)]('5', -'2');\n            continue;\n        case '5':\n            console[_0x1f346d(0x7b)](_0x56d39b);\n            continue;\n        case '6':\n            var _0x544285 = [\n                '10',\n                '10',\n                '10',\n                '10',\n                '10'\n            ][_0x1f346d(0x7a)](parseInt);\n            continue;\n        case '7':\n            var _0x4c96d8 = _0x860db8[_0x1f346d(0x68)]('5', 0x622 * -0x6 + 0x4a * 0x3 + 0x1 * 0x23f1);\n            continue;\n        case '8':\n            console[_0x1f346d(0x7b)](_0x544285);\n            continue;\n        case '9':\n            var _0x101028 = _0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x6f)](_0x860db8[_0x1f346d(0x77)], 0x6fb * 0x5 + 0x1ebf * 0x1 + -0x41a5), 0x209 * 0xa + 0x1314 + -0x276d);\n            continue;\n        }\n        break;\n    }\n}());\n*\u002F\n```\n\n### `obfuscate(sourceCode, options)`\n\nReturns `ObfuscationResult` object which contains two public methods:\n\n* `getObfuscatedCode()` - returns `string` with obfuscated code;\n* `getSourceMap()` - if [`sourceMap`](#sourcemap) option is enabled - returns `string` with source map or an empty string if [`sourceMapMode`](#sourcemapmode) option is set as `inline`;\n* `getIdentifierNamesCache()` - returns object with identifier names cache if `identifierNamesCache` option is enabled, `null` overwise.\n\nCalling `toString()` for `ObfuscationResult` object will return `string` with obfuscated code.\n\nMethod takes two parameters, `sourceCode` and `options` – the source code and the options respectively:\n\n* `sourceCode` (`string`, default: `null`) – any valid source code, passed as a string;\n* `options` (`Object`, default: `null`) – an object with options.\n\nFor available options, see [options](#options).\n\n### `obfuscateMultiple(sourceCodesObject, options)`\n\nAccepts `sourceCodesObject` that is a map which keys are identifiers of source codes and values are source codes:\n```\n{\n    foo: 'var foo = 1;',\n    bar: 'var bar = 2;'\n}\n```\n\nReturns a map object which keys are identifiers of source codes and values are `ObfuscationResult` objects.\n\n### `getOptionsByPreset(optionsPreset)`\n\nReturns an options object for the passed options preset name.\n\n---\n\n## :shield: Pro API Methods (VM Obfuscation)\n\nThe Pro API methods provide access to **VM-based bytecode obfuscation** through the [obfuscator.io](https:\u002F\u002Fobfuscator.io) cloud service. VM obfuscation is the most advanced and secure form of code protection available, transforming your JavaScript functions into custom bytecode that runs on an embedded virtual machine.\n\n**Why VM Obfuscation?**\n- **Strongest protection**: Code is converted to bytecode that cannot be directly understood\n- **Anti-decompilation**: No standard JavaScript to reverse engineer\n- **Customizable VM**: Each obfuscation generates unique opcodes and VM structure\n- **Layered security**: Combine with other obfuscation options for defense in depth\n\n### Getting an API Token\n\nTo use Pro API methods, you need a valid API token from [obfuscator.io](https:\u002F\u002Fobfuscator.io):\n\n1. Create an account at [obfuscator.io](https:\u002F\u002Fobfuscator.io)\n2. Subscribe to a Pro, Team, or Business plan that includes API access\n3. Generate your API token at [obfuscator.io\u002Fdashboard](https:\u002F\u002Fobfuscator.io\u002Fdashboard)\n\n### `obfuscatePro(sourceCode, options, proApiConfig, onProgress?)` :new:\n\n**Async method** that obfuscates code using the Pro API with VM-based bytecode obfuscation.\n\n```javascript\nconst JavaScriptObfuscator = require('javascript-obfuscator');\n\nconst result = await JavaScriptObfuscator.obfuscatePro(\n    `function hello() { console.log(\"Hello World\"); }`,\n    {\n        vmObfuscation: true,  \u002F\u002F Required!\n        compact: true\n    },\n    {\n        apiToken: 'your_javascript_obfuscator_pro_api_token'\n    }\n);\n\nconsole.log(result.getObfuscatedCode());\n```\n\n**Parameters:**\n\n* `sourceCode` (`string`) – source code to obfuscate\n* `options` (`Object`) – obfuscation options. **Must include at least one Pro feature: `vmObfuscation: true` or `parseHtml: true`**\n* `apiConfig` (`Object`) – Pro API configuration:\n  * `apiToken` (`string`, required) – your API token from obfuscator.io\n  * `timeout` (`number`, optional) – request timeout in ms (default: `300000` - 5 minutes)\n  * `version` (`string`, optional) – Obfuscator.io version to use (e.g., `'5.0.3'`). Defaults to latest version if not specified.\n* `onProgress` (`function`, optional) – callback for progress updates during obfuscation\n\n**Returns:** `Promise\u003CObfuscationResult>`\n\n**Throws:** `ApiError` if:\n- No Pro features (`vmObfuscation` or `parseHtml`) are enabled in options\n- API token is invalid or expired\n- API request fails\n\n### Pro API with Specific Version\n\nYou can specify which obfuscator version to use via the `version` option:\n\n```javascript\nconst result = await JavaScriptObfuscator.obfuscatePro(\n    sourceCode,\n    {\n        vmObfuscation: true\n    },\n    {\n        apiToken: 'your_javascript_obfuscator_pro_api_token',\n        version: '5.0.3'  \u002F\u002F Use specific version\n    }\n);\n```\n\n### Pro API with Progress Updates\n\nThe API uses streaming mode to provide real-time progress updates during obfuscation:\n\n```javascript\nconst result = await JavaScriptObfuscator.obfuscatePro(\n    sourceCode,\n    {\n        vmObfuscation: true\n    },\n    {\n        apiToken: 'your_javascript_obfuscator_pro_api_token'\n    },\n    (message) => {\n        console.log('Progress:', message);\n        \u002F\u002F Output: \"Validating request...\", \"Authenticating...\", \"Obfuscating...\", etc.\n    }\n);\n```\n\n### Checking for Pro Features\n\nUse `ProApiClient.hasProFeatures()` to check if options require the Pro API:\n\n```javascript\nconst { ProApiClient } = require('javascript-obfuscator');\n\nconst options = { vmObfuscation: true, compact: true };\n\nif (ProApiClient.hasProFeatures(options)) {\n    \u002F\u002F Use obfuscatePro() - requires API token\n    const result = await JavaScriptObfuscator.obfuscatePro(sourceCode, options, { apiToken });\n} else {\n    \u002F\u002F Use regular obfuscate() - no API token needed\n    const result = JavaScriptObfuscator.obfuscate(sourceCode, options);\n}\n```\n\nPro features include:\n- `vmObfuscation: true` – VM-based bytecode obfuscation\n- `parseHtml: true` – HTML parsing with inline JavaScript obfuscation\n\n### Error Handling\n\n```javascript\nconst { ApiError } = require('javascript-obfuscator');\n\ntry {\n    const result = await JavaScriptObfuscator.obfuscatePro(sourceCode, options, config);\n} catch (error) {\n    if (error instanceof ApiError) {\n        console.error(`API Error (${error.statusCode}): ${error.message}`);\n    } else {\n        throw error;\n    }\n}\n```\n\n### CLI Usage with Pro API\n\nYou can also use Pro API features directly from the CLI by providing your API token:\n\n```sh\njavascript-obfuscator input.js --pro-api-token YOUR_API_TOKEN --vm-obfuscation true -o output.js\n```\n\nWith a specific obfuscator version:\n\n```sh\njavascript-obfuscator input.js --pro-api-token YOUR_API_TOKEN --pro-api-version 5.0.3 --vm-obfuscation true -o output.js\n```\n\n**CLI Options:**\n- `--pro-api-token \u003Cstring>` – Your API token from [obfuscator.io](https:\u002F\u002Fobfuscator.io)\n- `--pro-api-version \u003Cstring>` – Obfuscator.io version to use (optional, defaults to latest)\n\nThe CLI automatically detects when Pro features (`vmObfuscation` or `parseHtml`) are enabled and routes the request through the Pro API.\n\n### Large File Uploads\n\nFor files larger than ~4MB, the Pro API uses client-side uploads to Vercel Blob storage. To enable this feature, install the optional `@vercel\u002Fblob` package:\n\n```sh\nnpm install @vercel\u002Fblob\n```\n\nWithout this package, large file obfuscation will fail with an error message prompting you to install it.\n\n---\n\n## CLI usage\n\nSee [CLI options](#cli-options).\n\n#### Obfuscate single file\n\nUsage:\n```sh\njavascript-obfuscator input_file_name.js [options]\njavascript-obfuscator input_file_name.js --output output_file_name.js [options]\njavascript-obfuscator input_file_name.js --output output_folder_name [options]\njavascript-obfuscator input_folder_name --output output_folder_name [options]\n```\n\nObfuscation of single input file with `.js` extension.\n\nIf the destination path is not specified with the `--output` option, the obfuscated file will be saved into the input file directory, with `INPUT_FILE_NAME-obfuscated.js` name.\n\nSome examples:\n```sh\njavascript-obfuscator samples\u002Fsample.js --compact true --self-defending false\n\u002F\u002F creates a new file samples\u002Fsample-obfuscated.js\n\njavascript-obfuscator samples\u002Fsample.js --output output\u002Foutput.js --compact true --self-defending false\n\u002F\u002F creates a new file output\u002Foutput.js\n```\n\n#### Obfuscate directory recursively\n\nUsage:\n```sh\njavascript-obfuscator .\u002Fdist [options]\n\u002F\u002F creates a new obfuscated files under `.\u002Fdist` directory near the input files with `obfuscated` postfix\n\njavascript-obfuscator .\u002Fdist --output .\u002Fdist\u002Fobfuscated [options]\n\u002F\u002F creates a folder structure with obfuscated files under `.\u002Fdist\u002Fobfuscated` path\n```\n\nObfuscation of all `.js` files under input directory. If this directory contains already obfuscated files with `-obfuscated` postfix - these files will ignored.\n\nObfuscated files will saved into the input directory under `INPUT_FILE_NAME-obfuscated.js` name.\n\n## Conditional comments\nYou can disable and enable obfuscation for specific parts of the code by adding following comments: \n* disable: `\u002F\u002F javascript-obfuscator:disable` or `\u002F* javascript-obfuscator:disable *\u002F`;\n* enable: `\u002F\u002F javascript-obfuscator:enable` or `\u002F* javascript-obfuscator:enable *\u002F`.\n\nExample:\n```javascript\n\u002F\u002F input\nvar foo = 1;\n\u002F\u002F javascript-obfuscator:disable\nvar bar = 2;\n\n\u002F\u002F output\nvar _0xabc123 = 0x1;\nvar bar = 2;\n```\nConditional comments affect only direct transformations of AST-tree nodes. All child transformations still will be applied to the AST-tree nodes. \n\nFor example:\n* Obfuscation of the variable's name at its declaration is called direct transformation;\n* Obfuscation of the variable's name beyond its declaration is called child transformation.\n\n## Kind of variables\n\nKind of variables of inserted nodes will auto-detected, based on most prevailing kind of variables of source code.\n\n## Conflicts of identifier names between different files\n\nDuring obfuscation of the different files, the same names can be generated for the global identifiers between these files.\nTo prevent this set the unique prefix for all global identifiers for each obfuscated file with [`identifiersPrefix`](#identifiersprefix) option. \n\nWhen using CLI this prefix will be added automatically.\n\n## JavaScript Obfuscator Options\n\n> :shield: **Looking for VM obfuscation?** Options like `vmObfuscation`, `parseHtml`, and every `vm*` option are Pro-only and require an API token from [obfuscator.io](https:\u002F\u002Fobfuscator.io). Use them via the [`obfuscatePro()`](#shield-pro-api-methods-vm-obfuscation) method, or the `--pro-api-token` CLI flag — see [Pro API Methods](#shield-pro-api-methods-vm-obfuscation).\n\nFollowing options are available for the JS Obfuscator:\n\n#### options:\n\n```javascript\n{\n    compact: true,\n    controlFlowFlattening: false,\n    controlFlowFlatteningThreshold: 0.75,\n    deadCodeInjection: false,\n    deadCodeInjectionThreshold: 0.4,\n    debugProtection: false,\n    debugProtectionInterval: 0,\n    disableConsoleOutput: false,\n    domainLock: [],\n    domainLockRedirectUrl: 'about:blank',\n    forceTransformStrings: [],\n    identifierNamesCache: null,\n    identifierNamesGenerator: 'hexadecimal',\n    identifiersDictionary: [],\n    identifiersPrefix: '',\n    ignoreImports: false,\n    inputFileName: '',\n    log: false,\n    numbersToExpressions: false,\n    optionsPreset: 'default',\n    renameGlobals: false,\n    renameProperties: false,\n    renamePropertiesMode: 'safe',\n    reservedNames: [],\n    reservedStrings: [],\n    seed: 0,\n    selfDefending: false,\n    simplify: true,\n    sourceMap: false,\n    sourceMapBaseUrl: '',\n    sourceMapFileName: '',\n    sourceMapMode: 'separate',\n    sourceMapSourcesMode: 'sources-content',\n    splitStrings: false,\n    splitStringsChunkLength: 10,\n    stringArray: true,\n    stringArrayCallsTransform: true,\n    stringArrayCallsTransformThreshold: 0.5,\n    stringArrayEncoding: [],\n    stringArrayIndexesType: [\n        'hexadecimal-number'\n    ],\n    stringArrayIndexShift: true,\n    stringArrayRotate: true,\n    stringArrayShuffle: true,\n    stringArrayWrappersCount: 1,\n    stringArrayWrappersChainedCalls: true,\n    stringArrayWrappersParametersMaxCount: 2,\n    stringArrayWrappersType: 'variable',\n    stringArrayThreshold: 0.75,\n    target: 'browser',\n    transformObjectKeys: false,\n    unicodeEscapeSequence: false\n}\n```\n\n#### CLI options:\n```sh\n    -v, --version\n    -h, --help\n\n    -o, --output\n\n    --compact \u003Cboolean>\n    --config \u003Cstring>\n    --control-flow-flattening \u003Cboolean>\n    --control-flow-flattening-threshold \u003Cnumber>\n    --dead-code-injection \u003Cboolean>\n    --dead-code-injection-threshold \u003Cnumber>\n    --debug-protection \u003Cboolean>\n    --debug-protection-interval \u003Cnumber>\n    --disable-console-output \u003Cboolean>\n    --domain-lock '\u003Clist>' (comma separated)\n    --domain-lock-redirect-url \u003Cstring>\n    --exclude '\u003Clist>' (comma separated)\n    --force-transform-strings '\u003Clist>' (comma separated)\n    --identifier-names-cache-path \u003Cstring>\n    --identifier-names-generator \u003Cstring> [dictionary, hexadecimal, mangled, mangled-shuffled]\n    --identifiers-dictionary '\u003Clist>' (comma separated)\n    --identifiers-prefix \u003Cstring>\n    --ignore-imports \u003Cboolean>\n    --log \u003Cboolean>\n    --numbers-to-expressions \u003Cboolean>\n    --options-preset \u003Cstring> [default, low-obfuscation, medium-obfuscation, high-obfuscation]\n    --rename-globals \u003Cboolean>\n    --rename-properties \u003Cboolean>\n    --rename-properties-mode \u003Cstring> [safe, unsafe]\n    --reserved-names '\u003Clist>' (comma separated)\n    --reserved-strings '\u003Clist>' (comma separated)\n    --seed \u003Cstring|number>\n    --self-defending \u003Cboolean>\n    --simplify \u003Cboolean>\n    --source-map \u003Cboolean>\n    --source-map-base-url \u003Cstring>\n    --source-map-file-name \u003Cstring>\n    --source-map-mode \u003Cstring> [inline, separate]\n    --source-map-sources-mode \u003Cstring> [sources, sources-content]\n    --split-strings \u003Cboolean>\n    --split-strings-chunk-length \u003Cnumber>\n    --string-array \u003Cboolean>\n    --string-array-calls-transform \u003Cboolean>\n    --string-array-calls-transform-threshold \u003Cnumber>\n    --string-array-encoding '\u003Clist>' (comma separated) [none, base64, rc4]\n    --string-array-indexes-type '\u003Clist>' (comma separated) [hexadecimal-number, hexadecimal-numeric-string]\n    --string-array-index-shift \u003Cboolean>\n    --string-array-rotate \u003Cboolean>\n    --string-array-shuffle \u003Cboolean>\n    --string-array-wrappers-count \u003Cnumber>\n    --string-array-wrappers-chained-calls \u003Cboolean>\n    --string-array-wrappers-parameters-max-count \u003Cnumber>\n    --string-array-wrappers-type \u003Cstring> [variable, function]\n    --string-array-threshold \u003Cnumber>\n    --target \u003Cstring> [browser, browser-no-eval, node]\n    --transform-object-keys \u003Cboolean>\n    --unicode-escape-sequence \u003Cboolean>\n    --pro-api-token \u003Cstring>\n    --pro-api-version \u003Cstring>\n    --vm-obfuscation \u003Cboolean>\n    --vm-obfuscation-threshold \u003Cnumber>\n    --vm-preprocess-identifiers \u003Cboolean>\n    --vm-dynamic-opcodes \u003Cboolean>\n    --vm-target-functions '\u003Clist>' (comma separated)\n    --vm-exclude-functions '\u003Clist>' (comma separated)\n    --vm-target-functions-mode \u003Cstring> [root, comment]\n    --vm-wrap-top-level-initializers \u003Cboolean>\n    --vm-opcode-shuffle \u003Cboolean>\n    --vm-bytecode-encoding \u003Cboolean>\n    --vm-bytecode-array-encoding \u003Cboolean>\n    --vm-bytecode-array-encoding-key \u003Cstring>\n    --vm-bytecode-array-encoding-key-getter \u003Cstring>\n    --vm-instruction-shuffle \u003Cboolean>\n    --vm-jumps-encoding \u003Cboolean>\n    --vm-decoy-opcodes \u003Cboolean>\n    --vm-dead-code-injection \u003Cboolean>\n    --vm-split-dispatcher \u003Cboolean>\n    --vm-macro-ops \u003Cboolean>\n    --vm-debug-protection \u003Cboolean>\n    --vm-runtime-opcode-derivation \u003Cboolean>\n    --vm-stateful-opcodes \u003Cboolean>\n    --vm-stack-encoding \u003Cboolean>\n    --vm-randomize-keys \u003Cboolean>\n    --vm-indirect-dispatch \u003Cboolean>\n    --vm-compact-dispatcher \u003Cboolean>\n    --vm-bytecode-format \u003Cstring> [binary, json]\n    --parse-html \u003Cboolean>\n    --strict-mode \u003Cboolean>\n```\n\n\u003C!-- ##options-start## -->\n\n### `compact`\nType: `boolean` Default: `true`\n\nCompact code output on one line.\n\n### `config`\nType: `string` Default: ``\n\nName of JS\u002FJSON config file which contains obfuscator options. These will be overridden by options passed directly to CLI\n\n### `controlFlowFlattening`\nType: `boolean` Default: `false`\n\n##### :warning: This option greatly affects the performance up to 1.5x slower runtime speed. Use [`controlFlowFlatteningThreshold`](#controlflowflatteningthreshold) to set percentage of nodes that will affected by control flow flattening. \n\nEnables code control flow flattening. Control flow flattening is a structure transformation of the source code that hinders program comprehension.\n\nExample:\n```ts\n\u002F\u002F input\n(function(){\n    function foo () {\n        return function () {\n            var sum = 1 + 2;\n            console.log(1);\n            console.log(2);\n            console.log(3);\n            console.log(4);\n            console.log(5);\n            console.log(6);\n        }\n    }\n    \n    foo()();\n})();\n\n\u002F\u002F output\n(function () {\n    function _0x3bfc5c() {\n        return function () {\n            var _0x3260a5 = {\n                'WtABe': '4|0|6|5|3|2|1',\n                'GokKo': function _0xf87260(_0x427a8e, _0x43354c) {\n                    return _0x427a8e + _0x43354c;\n                }\n            };\n            var _0x1ad4d6 = _0x3260a5['WtABe']['split']('|'), _0x1a7b12 = 0x0;\n            while (!![]) {\n                switch (_0x1ad4d6[_0x1a7b12++]) {\n                case '0':\n                    console['log'](0x1);\n                    continue;\n                case '1':\n                    console['log'](0x6);\n                    continue;\n                case '2':\n                    console['log'](0x5);\n                    continue;\n                case '3':\n                    console['log'](0x4);\n                    continue;\n                case '4':\n                    var _0x1f2f2f = _0x3260a5['GokKo'](0x1, 0x2);\n                    continue;\n                case '5':\n                    console['log'](0x3);\n                    continue;\n                case '6':\n                    console['log'](0x2);\n                    continue;\n                }\n                break;\n            }\n        };\n    }\n\n\t_0x3bfc5c()();\n}());\n```\n\n### `controlFlowFlatteningThreshold`\nType: `number` Default: `0.75` Min: `0` Max: `1`\n\nThe probability that the [`controlFlowFlattening`](#controlflowflattening) transformation will be applied to any given node.\n\nThis setting is especially useful for large code size because large amounts of control flow transformations can slow down your code and increase code size.\n\n`controlFlowFlatteningThreshold: 0` equals to `controlFlowFlattening: false`.\n\n### `deadCodeInjection`\nType: `boolean` Default: `false`\n\n##### :warning: Dramatically increases size of obfuscated code (up to 200%), use only if size of obfuscated code doesn't matter. Use [`deadCodeInjectionThreshold`](#deadcodeinjectionthreshold) to set percentage of nodes that will affected by dead code injection.\n##### :warning: This option forcibly enables `stringArray` option.\n\nWith this option, random blocks of dead code will be added to the obfuscated code. \n\nExample:\n```ts\n\u002F\u002F input\n(function(){\n    if (true) {\n        var foo = function () {\n            console.log('abc');\n        };\n        var bar = function () {\n            console.log('def');\n        };\n        var baz = function () {\n            console.log('ghi');\n        };\n        var bark = function () {\n            console.log('jkl');\n        };\n        var hawk = function () {\n            console.log('mno');\n        };\n\n        foo();\n        bar();\n        baz();\n        bark();\n        hawk();\n    }\n})();\n\n\u002F\u002F output\nvar _0x37b8 = [\n    'YBCtz',\n    'GlrkA',\n    'urPbb',\n    'abc',\n    'NMIhC',\n    'yZgAj',\n    'zrAId',\n    'EtyJA',\n    'log',\n    'mno',\n    'jkl',\n    'def',\n    'Quzya',\n    'IWbBa',\n    'ghi'\n];\nfunction _0x43a7(_0x12cf56, _0x587376) {\n    _0x43a7 = function (_0x2f87a8, _0x47eac2) {\n        _0x2f87a8 = _0x2f87a8 - (0x16a7 * 0x1 + 0x5 * 0x151 + -0x1c92);\n        var _0x341e03 = _0x37b8[_0x2f87a8];\n        return _0x341e03;\n    };\n    return _0x43a7(_0x12cf56, _0x587376);\n}\n(function () {\n    if (!![]) {\n        var _0xbbe28f = function () {\n            var _0x2fc85f = _0x43a7;\n            if (_0x2fc85f(0xaf) === _0x2fc85f(0xae)) {\n                _0x1dd94f[_0x2fc85f(0xb2)](_0x2fc85f(0xb5));\n            } else {\n                console[_0x2fc85f(0xb2)](_0x2fc85f(0xad));\n            }\n        };\n        var _0x5e46bc = function () {\n            var _0x15b472 = _0x43a7;\n            if (_0x15b472(0xb6) !== _0x15b472(0xaa)) {\n                console[_0x15b472(0xb2)](_0x15b472(0xb5));\n            } else {\n                _0x47eac2[_0x15b472(0xb2)](_0x15b472(0xad));\n            }\n        };\n        var _0x3669e8 = function () {\n            var _0x47a442 = _0x43a7;\n            if (_0x47a442(0xb7) !== _0x47a442(0xb0)) {\n                console[_0x47a442(0xb2)](_0x47a442(0xb8));\n            } else {\n                _0x24e0bf[_0x47a442(0xb2)](_0x47a442(0xb3));\n            }\n        };\n        var _0x28b05a = function () {\n            var _0x497902 = _0x43a7;\n            if (_0x497902(0xb1) === _0x497902(0xb1)) {\n                console[_0x497902(0xb2)](_0x497902(0xb4));\n            } else {\n                _0x59c9c6[_0x497902(0xb2)](_0x497902(0xb4));\n            }\n        };\n        var _0x402a54 = function () {\n            var _0x1906b7 = _0x43a7;\n            if (_0x1906b7(0xab) === _0x1906b7(0xac)) {\n                _0xb89cd0[_0x1906b7(0xb2)](_0x1906b7(0xb8));\n            } else {\n                console[_0x1906b7(0xb2)](_0x1906b7(0xb3));\n            }\n        };\n        _0xbbe28f();\n        _0x5e46bc();\n        _0x3669e8();\n        _0x28b05a();\n        _0x402a54();\n    }\n}());\n```\n\n### `deadCodeInjectionThreshold`\nType: `number` Default: `0.4` Min: `0` Max: `1`\n\nAllows to set percentage of nodes that will affected by `deadCodeInjection`.\n\n### `debugProtection`\nType: `boolean` Default: `false`\n\n##### :warning: Can freeze your browser if you open the Developer Tools.\n\nThis option makes it almost impossible to use the `debugger` function of the Developer Tools (both on WebKit-based and Mozilla Firefox).\n\n### `debugProtectionInterval`\nType: `number` Default: `0`\n\n##### :warning: Can freeze your browser! Use at own risk.\n\nIf set, an interval in milliseconds is used to force the debug mode on the Console tab, making it harder to use other features of the Developer Tools. Works if [`debugProtection`](#debugprotection) is enabled. Recommended value is between `2000` and `4000` milliseconds.\n\n### `disableConsoleOutput`\nType: `boolean` Default: `false`\n\n##### :warning: This option disables `console` calls globally for all scripts\n\nDisables the use of `console.log`, `console.info`, `console.error`, `console.warn`, `console.debug`, `console.exception` and `console.trace` by replacing them with empty functions. This makes the use of the debugger harder.\n\n### `domainLock`\nType: `string[]` Default: `[]`\n\n##### :warning: This option does not work with `target: 'node'`\n\nAllows to run the obfuscated source code only on specific domains and\u002For sub-domains. This makes really hard for someone to just copy and paste your source code and run it elsewhere.\n\nIf the source code isn't run on the domains specified by this option, the browser will be redirected to a passed to the [`domainLockRedirectUrl`](#domainlockredirecturl) option URL.\n\n##### Multiple domains and sub-domains\nIt's possible to lock your code to more than one domain or sub-domain. For instance, to lock it so the code only runs on **www.example.com** add `www.example.com`. To make it work on the root domain including any sub-domains (`example.com`, `sub.example.com`), use `.example.com`.\n\n### `domainLockRedirectUrl`\nType: `string` Default: `about:blank`\n\n##### :warning: This option does not work with `target: 'node'`\n\nAllows the browser to be redirected to a passed URL if the source code isn't run on the domains specified by [`domainLock`](#domainlock)\n\n### `exclude`\nType: `string[]` Default: `[]`\n\nA file names or globs which indicates files to exclude from obfuscation. \n\n### `forceTransformStrings`\nType: `string[]` Default: `[]`\n\nEnables force transformation of string literals, which being matched by passed RegExp patterns.\n\n##### :warning: This option affects only strings that shouldn't be transformed by [`stringArrayThreshold`](#stringarraythreshold) (or possible other thresholds in the future)\n\nThe option has a priority over `reservedStrings` option but hasn't a priority over `conditional comments`.\n\nExample:\n```ts\n\t{\n\t\tforceTransformStrings: [\n\t\t\t'some-important-value',\n\t\t\t'some-string_\\d'\n\t\t]\n\t}\n```\n\n### `identifierNamesCache`\nType: `Object | null` Default: `null`\n\nThe main goal for this option is the ability to use the same identifier names during obfuscation of multiple sources\u002Ffiles.\n\nCurrently the two types of the identifiers are supported:\n- Global identifiers:\n    * All global identifiers will be written to the cache;\n    * All matched **undeclared** global identifiers will be replaced by the values from the cache.\n- Property identifiers, only when `renameProperties` option is enabled:\n    * All property identifiers will be written to the cache;\n    * All matched property identifiers will be replaced by the values from the cache.\n\n#### Node.js API\nIf a `null` value is passed, completely disables the cache.\n\nIf an empty object (`{}`) is passed, enables the writing identifier names to the cache-object (`TIdentifierNamesCache` type). This cache-object will be accessed through the `getIdentifierNamesCache` method call of `ObfuscationResult` object.\n\nThe resulting cache-object can be next used as `identifierNamesGenerator` option value for using these names during obfuscation of all matched identifier names of next sources.\n\nExample:\n```ts\nconst source1ObfuscationResult = JavaScriptObfuscator.obfuscate(\n    `\n        function foo(arg) {\n           console.log(arg)\n        }\n        \n        function bar() {\n            var bark = 2;\n        }\n    `,\n    {\n        compact: false,\n        identifierNamesCache: {},\n        renameGlobals: true\n    }\n)\n\nconsole.log(source1ObfuscationResult.getIdentifierNamesCache());\n\u002F*\n    { \n        globalIdentifiers: {\n            foo: '_0x5de86d',\n            bar: '_0x2a943b'\n        }\n    }\n*\u002F\n\n\n\nconst source2ObfuscationResult = JavaScriptObfuscator.obfuscate(\n    `\n        \u002F\u002F Expecting that these global functions are defined in another obfuscated file\n        foo(1);\n        bar();\n        \n        \u002F\u002F Expecting that this global function is defined in third-party package\n        baz();\n    `,\n    {\n        compact: false,\n        identifierNamesCache: source1ObfuscationResult.getIdentifierNamesCache(),\n        renameGlobals: true\n    }\n)\n\nconsole.log(source2ObfuscationResult.getObfuscatedCode());\n\u002F*\n    _0x5de86d(0x1);\n    _0x2a943b();\n    baz();\n *\u002F\n```\n\n#### CLI\nCLI has a different option `--identifier-names-cache-path` that allows defining a path to the existing `.json` file that will be used to read and write identifier names cache.\n\nIf a path to the empty file will be passed - identifier names cache will be written to that file.\n\nThis file with existing cache can be used again as `--identifier-names-cache-path` option value for using these names during obfuscation of all matched identifier names of the next files.\n\n### `identifierNamesGenerator`\nType: `string` Default: `hexadecimal`\n\nSets identifier names generator.\n\nAvailable values:\n* `dictionary`: identifier names from [`identifiersDictionary`](#identifiersdictionary) list\n* `hexadecimal`: identifier names like `_0xabc123`\n* `mangled`: short identifier names like `a`, `b`, `c`\n* `mangled-shuffled`: same as `mangled` but with shuffled alphabet\n\n### `identifiersDictionary`\nType: `string[]` Default: `[]`\n\nSets identifiers dictionary for [`identifierNamesGenerator`](#identifiernamesgenerator): `dictionary` option. Each identifier from the dictionary will be used in a few variants with a different casing of each character. Thus, the number of identifiers in the dictionary should depend on the identifiers amount at original source code.\n\n### `identifiersPrefix`\nType: `string` Default: `''`\n\nSets prefix for all global identifiers.\n\nUse this option when you want to obfuscate multiple files. This option helps to avoid conflicts between global identifiers of these files. Prefix should be different for every file.\n\n### `ignoreImports`\nType: `boolean` Default: `false`\n\nPrevents obfuscation of `require` imports. Could be helpful in some cases when for some reason runtime environment requires these imports with static strings only.\n\n### `inputFileName`\nType: `string` Default: `''`\n\nAllows to set name of the input file with source code. This name will be used internally for source map generation.\nRequired when using NodeJS API and `sourceMapSourcesMode` option has `sources` value`.\n\n### `log`\nType: `boolean` Default: `false`\n\nEnables logging of the information to the console.\n\n### `numbersToExpressions`\nType: `boolean` Default: `false`\n\nEnables numbers conversion to expressions\n\nExample: \n```ts\n\u002F\u002F input\nconst foo = 1234;\n\n\u002F\u002F output\nconst foo=-0xd93+-0x10b4+0x41*0x67+0x84e*0x3+-0xff8;\n```\n\n### `optionsPreset`\nType: `string` Default: `default`\n\nAllows to set [options preset](#preset-options).\n\nAvailable values: \n* `default`;\n* `low-obfuscation`;\n* `medium-obfuscation`;\n* `high-obfuscation`.\n\nAll addition options will be merged with selected options preset.\n\n### `renameGlobals`\nType: `boolean` Default: `false`\n\n##### :warning: this option can break your code. Enable it only if you know what it does!\n\nEnables obfuscation of global variable and function names **with declaration**.\n\n### `renameProperties`\nType: `boolean` Default: `false`\n\n##### :warning: this option **MAY** break your code. Enable it only if you know what it does!\n\nEnables renaming of property names. All built-in DOM properties and properties in core JavaScript classes will be ignored.\n\nTo switch between `safe` and `unsafe` modes of this option use [`renamePropertiesMode`](#renamepropertiesmode) option.\n\nTo set format of renamed property names use [`identifierNamesGenerator`](#identifiernamesgenerator) option.\n\nTo control which properties will be renamed use [`reservedNames`](#reservednames) option.\n\nExample: \n```ts\n\u002F\u002F input\n(function () {\n    const foo = {\n        prop1: 1,\n        prop2: 2,\n        calc: function () {\n            return this.prop1 + this.prop2;\n        }\n    };\n    \n    console.log(foo.calc());\n})();\n\n\u002F\u002F output\n(function () {\n    const _0x46529b = {\n        '_0x10cec7': 0x1,\n        '_0xc1c0ca': 0x2,\n        '_0x4b961d': function () {\n            return this['_0x10cec7'] + this['_0xc1c0ca'];\n        }\n    };\n    console['log'](_0x46529b['_0x4b961d']());\n}());\n```\n\n### `renamePropertiesMode`\nType: `string` Default: `safe`\n\n##### :warning: Even in `safe` mode, [`renameProperties`](#renameproperties) option **MAY** break your code.\n\nSpecifies `renameProperties` option mode:\n* `safe` - default behaviour after `2.11.0` release. Trying to rename properties in a more safe way to prevent runtime errors. With this mode some properties will be excluded from renaming.\n* `unsafe` - default behaviour before `2.11.0` release. Renames properties in an unsafe way without any restrictions.\n\nIf one file is using properties from other file, use [`identifierNamesCache`](#identifiernamescache) option to keep the same property names between these files.\n\n### `reservedNames`\nType: `string[]` Default: `[]`\n\nDisables obfuscation and generation of identifiers, which being matched by passed RegExp patterns.\n\nExample:\n```ts\n\t{\n\t\treservedNames: [\n\t\t\t'^someVariable',\n\t\t\t'functionParameter_\\d'\n\t\t]\n\t}\n```\n\n### `reservedStrings`\nType: `string[]` Default: `[]`\n\nDisables transformation of string literals, which being matched by passed RegExp patterns.\n\nExample:\n```ts\n\t{\n\t\treservedStrings: [\n\t\t\t'react-native',\n\t\t\t'\\.\\\u002Fsrc\\\u002Ftest',\n\t\t\t'some-string_\\d'\n\t\t]\n\t}\n```\n\n### `seed`\nType: `string|number` Default: `0`\n\nThis option sets seed for random generator. This is useful for creating repeatable results.\n\nIf seed is `0` - random generator will work without seed.\n\n### `selfDefending`\nType: `boolean` Default: `false`\n\n##### :warning: Don't change obfuscated code in any way after obfuscation with this option, because any change like uglifying of code can trigger self defending and code wont work anymore!\n##### :warning: This option forcibly sets `compact` value to `true`\n\nThis option makes the output code resilient against formatting and variable renaming. If one tries to use a JavaScript beautifier on the obfuscated code, the code won't work anymore, making it harder to understand and modify it.\n\n### `simplify`\nType: `boolean` Default: `true`\n\nEnables additional code obfuscation through simplification.\n\n##### :warning: in future releases obfuscation of `boolean` literals (`true` => `!![]`) will be moved under this option. \n\nExample:\n```ts\n\u002F\u002F input\nif (condition1) {\n    const foo = 1;\n    const bar = 2;\n  \n    console.log(foo);\n  \n    return bar;\n} else if (condition2) {\n    console.log(1);\n    console.log(2);\n    console.log(3);\n  \n    return 4;\n} else {\n    return 5;\n}\n\n\u002F\u002F output\nif (condition1) {\n    const foo = 0x1, bar = 0x2;\n    return console['log'](foo), bar;\n} else\n    return condition2 ? (console['log'](0x1), console['log'](0x2), console['log'](0x3), 0x4) : 0x5;\n```\n\n### `sourceMap`\nType: `boolean` Default: `false`\n\nEnables source map generation for obfuscated code.\n\nSource maps can be useful to help you debug your obfuscated JavaScript source code. If you want or need to debug in production, you can upload the separate source map file to a secret location and then point your browser there. \n\n### `sourceMapBaseUrl`\nType: `string` Default: ``\n\nSets base url to the source map import url when [`sourceMapMode: 'separate'`](#sourcemapmode).\n \nCLI example:\n```\njavascript-obfuscator input.js --output out.js --source-map true --source-map-base-url 'http:\u002F\u002Flocalhost:9000'\n```\n\nResult: \n```\n\u002F\u002F# sourceMappingURL=http:\u002F\u002Flocalhost:9000\u002Fout.js.map\n```\n\n### `sourceMapFileName`\nType: `string` Default: ``\n\nSets file name for output source map when `sourceMapMode: 'separate'`.\n\nCLI example:\n```\njavascript-obfuscator input.js --output out.js --source-map true --source-map-base-url 'http:\u002F\u002Flocalhost:9000' --source-map-file-name example\n```\n\nResult: \n```\n\u002F\u002F# sourceMappingURL=http:\u002F\u002Flocalhost:9000\u002Fexample.js.map\n```\n\n### `sourceMapMode`\nType: `string` Default: `separate`\n\nSpecifies source map generation mode:\n* `inline` - add source map at the end of each .js files;\n* `separate` - generates corresponding '.map' file with source map. In case you run obfuscator through CLI - adds link to source map file to the end of file with obfuscated code `\u002F\u002F# sourceMappingUrl=file.js.map`.\n\n### `sourceMapSourcesMode`\nType: `string` Default: `sources-content`\n\nAllows to control `sources` and `sourcesContent` fields of the source map:\n* `sources-content` - adds dummy `sources` field, adds `sourcesContent` field with the original source code;\n* `sources` - adds `sources` field with a valid source description, does not add `sourcesContent` field. When using NodeJS API it's required to define `inputFileName` option that will be used as `sources` field value.\n\n### `splitStrings`\nType: `boolean` Default: `false`\n\nSplits literal strings into chunks with length of [`splitStringsChunkLength`](#splitstringschunklength) option value.\n\nExample:\n```ts\n\u002F\u002F input\n(function(){\n    var test = 'abcdefg';\n})();\n\n\u002F\u002F output\n(function(){\n    var _0x5a21 = 'ab' + 'cd' + 'ef' + 'g';\n})();\n```\n\n### `splitStringsChunkLength`\nType: `number` Default: `10`\n\nSets chunk length of [`splitStrings`](#splitstrings) option.\n\n### `stringArray`\nType: `boolean` Default: `true`\n\nRemoves string literals and place them in a special array. For instance, the string `\"Hello World\"` in `var m = \"Hello World\";` will be replaced with something like `var m = _0x12c456[0x1];`\n\n### `stringArrayCallsTransform`\nType: `boolean` Default: `false`\n\n##### :warning: [`stringArray`](#stringarray) option must be enabled\n\nEnables the transformation of calls to the [`stringArray`](#stringarray). All arguments of these calls may be extracted to a different object depending on [`stringArrayCallsTransformThreshold`](#stringarraycallstransformthreshold) value.\nSo it makes it even harder to automatically find calls to the string array.\n\nExample:\n```\nfunction foo() {\n    var k = {\n        c: 0x2f2,\n        d: '0x396',\n        e: '0x397',\n        f: '0x39a',\n        g: '0x39d',\n        h: 0x398,\n        l: 0x394,\n        m: '0x39b',\n        n: '0x39f',\n        o: 0x395,\n        p: 0x395,\n        q: 0x399,\n        r: '0x399'\n    };\n    var c = i(k.d, k.e);\n    var d = i(k.f, k.g);\n    var e = i(k.h, k.l);\n    var f = i(k.m, k.n);\n    function i(c, d) {\n        return b(c - k.c, d);\n    }\n    var g = i(k.o, k.p);\n    var h = i(k.q, k.r);\n}\nfunction j(c, d) {\n    var l = { c: 0x14b };\n    return b(c - -l.c, d);\n}\nconsole[j(-'0xa6', -'0xa6')](foo());\nfunction b(c, d) {\n    var e = a();\n    b = function (f, g) {\n        f = f - 0xa3;\n        var h = e[f];\n        return h;\n    };\n    return b(c, d);\n}\nfunction a() {\n    var m = [\n        'string5',\n        'string1',\n        'log',\n        'string3',\n        'string6',\n        'string2',\n        'string4'\n    ];\n    a = function () {\n        return m;\n    };\n    return a();\n}\n```\n\n### `stringArrayCallsTransformThreshold`\nType: `number` Default: `0.5`\n\n##### :warning: [`stringArray`](#stringarray) and [`stringArrayCallsTransformThreshold`](#stringarraycallstransformthreshold) options must be enabled\n\nYou can use this setting to adjust the probability (from 0 to 1) that calls to the string array will be transformed.\n\n### `stringArrayEncoding`\nType: `string[]` Default: `[]`\n\n##### :warning: `stringArray` option must be enabled\n\nThis option can slow down your script.\n\nEncode all string literals of the [`stringArray`](#stringarray) using `base64` or `rc4` and inserts a special code that used to decode it back at runtime.\n\nEach `stringArray` value will be encoded by the randomly picked encoding from the passed list. This makes possible to use multiple encodings.\n\nAvailable values:\n* `'none'` (`boolean`): doesn't encode `stringArray` value\n* `'base64'` (`string`): encodes `stringArray` value using `base64`\n* `'rc4'` (`string`): encodes `stringArray` value using `rc4`. **About 30-50% slower than `base64`, but harder to get initial values.** It's recommended to disable [`unicodeEscapeSequence`](#unicodeescapesequence) option when using `rc4` encoding to prevent very large size of obfuscated code.\n\nFor example with the following option values some `stringArray` value won't be encoded, and some values will be encoded with `base64` and `rc4` encoding:\n\n```ts\nstringArrayEncoding: [\n    'none',\n    'base64',\n    'rc4'\n]\n```\n\n### `stringArrayIndexesType`\nType: `string[]` Default: `['hexadecimal-number']`\n\n##### :warning: `stringArray` option must be enabled\n\nAllows to control the type of string array call indexes.\n\nEach `stringArray` call index will be transformed by the randomly picked type from the passed list. This makes possible to use multiple types.\n\nAvailable values:\n* `'hexadecimal-number'` (`default`): transforms string array call indexes as hexadecimal numbers\n* `'hexadecimal-numeric-string'`: transforms string array call indexes as hexadecimal numeric string\n\nBefore `2.9.0` release `javascript-obfuscator` transformed all string array call indexes with `hexadecimal-numeric-string` type. This makes some manual deobfuscation slightly harder but it allows easy detection of these calls by automatic deobfuscators.\n\nThe new `hexadecimal-number` type approaches to make harder auto-detect of string array call patterns in the code.\n\nMore types will be added in the future.\n\n### `stringArrayIndexShift`\nType: `boolean` Default: `true`\n\n##### :warning: `stringArray` option must be enabled\n\nEnables additional index shift for all string array calls\n\n### `stringArrayRotate`\nType: `boolean` Default: `true`\n\n##### :warning: [`stringArray`](#stringarray) must be enabled\n\nShift the `stringArray` array by a fixed and random (generated at the code obfuscation) places. This makes it harder to match the order of the removed strings to their original place.\n\n### `stringArrayShuffle`\nType: `boolean` Default: `true`\n\n##### :warning: [`stringArray`](#stringarray) must be enabled\n\nRandomly shuffles the `stringArray` array items.\n\n### `stringArrayWrappersCount`\nType: `number` Default: `1`\n\n##### :warning: [`stringArray`](#stringarray) option must be enabled\n\nSets the count of wrappers for the `string array` inside each root or function scope.\nThe actual count of wrappers inside each scope is limited by a count of `literal` nodes within this scope.\n\nExample:\n```ts\n\u002F\u002F Input\nconst foo = 'foo';\nconst bar = 'bar';\n        \nfunction test () {\n    const baz = 'baz';\n    const bark = 'bark';\n    const hawk = 'hawk';\n}\n\nconst eagle = 'eagle';\n\n\u002F\u002F Output, stringArrayWrappersCount: 5\nconst _0x3f6c = [\n    'bark',\n    'bar',\n    'foo',\n    'eagle',\n    'hawk',\n    'baz'\n];\nconst _0x48f96e = _0x2e13;\nconst _0x4dfed8 = _0x2e13;\nconst _0x55e970 = _0x2e13;\nfunction _0x2e13(_0x33c4f5, _0x3f6c62) {\n    _0x2e13 = function (_0x2e1388, _0x60b1e) {\n        _0x2e1388 = _0x2e1388 - 0xe2;\n        let _0x53d475 = _0x3f6c[_0x2e1388];\n        return _0x53d475;\n    };\n    return _0x2e13(_0x33c4f5, _0x3f6c62);\n}\nconst foo = _0x48f96e(0xe4);\nconst bar = _0x4dfed8(0xe3);\nfunction test() {\n    const _0x1c262f = _0x2e13;\n    const _0x54d7a4 = _0x2e13;\n    const _0x5142fe = _0x2e13;\n    const _0x1392b0 = _0x1c262f(0xe7);\n    const _0x201a58 = _0x1c262f(0xe2);\n    const _0xd3a7fb = _0x1c262f(0xe6);\n}\nconst eagle = _0x48f96e(0xe5);\n```\n\n### `stringArrayWrappersChainedCalls`\nType: `boolean` Default: `true`\n\n##### :warning: [`stringArray`](#stringarray) and [`stringArrayWrappersCount`](#stringarraywrapperscount) options must be enabled\n\nEnables the chained calls between `string array` wrappers.\n\nExample:\n```ts\n\u002F\u002F Input\nconst foo = 'foo';\nconst bar = 'bar';\n        \nfunction test () {\n    const baz = 'baz';\n    const bark = 'bark';\n\n    function test1() {\n        const hawk = 'hawk';\n        const eagle = 'eagle';\n    } \n}\n\n\u002F\u002F Output, stringArrayWrappersCount: 5, stringArrayWrappersChainedCalls: true\nconst _0x40c2 = [\n    'bar',\n    'bark',\n    'hawk',\n    'eagle',\n    'foo',\n    'baz'\n];\nconst _0x31c087 = _0x3280;\nconst _0x31759a = _0x3280;\nfunction _0x3280(_0x1f52ee, _0x40c2a2) {\n    _0x3280 = function (_0x3280a4, _0xf07b02) {\n        _0x3280a4 = _0x3280a4 - 0x1c4;\n        let _0x57a182 = _0x40c2[_0x3280a4];\n        return _0x57a182;\n    };\n    return _0x3280(_0x1f52ee, _0x40c2a2);\n}\nconst foo = _0x31c087(0x1c8);\nconst bar = _0x31c087(0x1c4);\nfunction test() {\n    const _0x848719 = _0x31759a;\n    const _0x2693bf = _0x31c087;\n    const _0x2c08e8 = _0x848719(0x1c9);\n    const _0x359365 = _0x2693bf(0x1c5);\n    function _0x175e90() {\n        const _0x310023 = _0x848719;\n        const _0x2302ef = _0x2693bf;\n        const _0x237437 = _0x310023(0x1c6);\n        const _0x56145c = _0x310023(0x1c7);\n    }\n}\n```\n\n### `stringArrayWrappersParametersMaxCount`\nType: `number` Default: `2`\n\n##### :warning: [`stringArray`](#stringarray) option must be enabled\n##### :warning: Currently this option affects only wrappers added by [`stringArrayWrappersType`](#stringarraywrapperstype) `function` option value\n\nAllows to control the maximum number of string array wrappers parameters.\nDefault and minimum value is `2`. Recommended value between `2` and `5`.\n\n### `stringArrayWrappersType`\nType: `string` Default: `variable`\n\n##### :warning: [`stringArray`](#stringarray) and [`stringArrayWrappersCount`](#stringarraywrapperscount) options must be enabled\n\nAllows to select a type of the wrappers that are appending by the `stringArrayWrappersCount` option.\n\nAvailable values:\n* `'variable'`: appends variable wrappers at the top of each scope. Fast performance.\n* `'function'`: appends function wrappers at random positions inside each scope. Slower performance than with `variable` but provides more strict obfuscation.\n\nHighly recommended to use `function` wrappers for higher obfuscation when a performance loss doesn't have a high impact on an obfuscated application.\n\nExample of the `'function'` option value:\n```ts\n\u002F\u002F input\nconst foo = 'foo';\n\nfunction test () {\n    const bar = 'bar';\n    console.log(foo, bar);\n}\n\ntest();\n\n\u002F\u002F output\nconst a = [\n    'log',\n    'bar',\n    'foo'\n];\nconst foo = d(0x567, 0x568);\nfunction b(c, d) {\n    b = function (e, f) {\n        e = e - 0x185;\n        let g = a[e];\n        return g;\n    };\n    return b(c, d);\n}\nfunction test() {\n    const c = e(0x51c, 0x51b);\n    function e (c, g) {\n        return b(c - 0x396, g);\n    }\n    console[f(0x51b, 0x51d)](foo, c);\n    function f (c, g) {\n        return b(c - 0x396, g);\n    }\n}\nfunction d (c, g) {\n    return b(g - 0x3e1, c);\n}\ntest();\n```\n    \n### `stringArrayThreshold`\nType: `number` Default: `0.8` Min: `0` Max: `1`\n\n##### :warning: [`stringArray`](#stringarray) option must be enabled\n\nYou can use this setting to adjust the probability (from 0 to 1) that a string literal will be inserted into the `stringArray`.\n\nThis setting is especially useful for large code size because it repeatedly calls to the `string array` and can slow down your code.\n\n`stringArrayThreshold: 0` equals to `stringArray: false`.\n\n### `target`\nType: `string` Default: `browser`\n\nAllows to set target environment for obfuscated code.\n\nAvailable values: \n* `browser`;\n* `browser-no-eval`;\n* `node`.\n\nCurrently output code for `browser` and `node` targets is identical, but some browser-specific options are not allowed to use with `node` target.\nOutput code for `browser-no-eval` target is not using `eval`.\n\n### `transformObjectKeys`\nType: `boolean` Default: `false`\n\nEnables transformation of object keys.\n\nExample:\n```ts\n\u002F\u002F input\n(function(){\n    var object = {\n        foo: 'test1',\n        bar: {\n            baz: 'test2'\n        }\n    };\n})();\n\n\u002F\u002F output\nvar _0x4735 = [\n    'foo',\n    'baz',\n    'bar',\n    'test1',\n    'test2'\n];\nfunction _0x390c(_0x33d6b6, _0x4735f4) {\n    _0x390c = function (_0x390c37, _0x1eed85) {\n        _0x390c37 = _0x390c37 - 0x198;\n        var _0x2275f8 = _0x4735[_0x390c37];\n        return _0x2275f8;\n    };\n    return _0x390c(_0x33d6b6, _0x4735f4);\n}\n(function () {\n    var _0x17d1b7 = _0x390c;\n    var _0xc9b6bb = {};\n    _0xc9b6bb[_0x17d1b7(0x199)] = _0x17d1b7(0x19c);\n    var _0x3d959a = {};\n    _0x3d959a[_0x17d1b7(0x198)] = _0x17d1b7(0x19b);\n    _0x3d959a[_0x17d1b7(0x19a)] = _0xc9b6bb;\n    var _0x41fd86 = _0x3d959a;\n}());\n```\n\n### `unicodeEscapeSequence`\nType: `boolean` Default: `false`\n\nAllows to enable\u002Fdisable string conversion to unicode escape sequence.\n\nUnicode escape sequence increases code size greatly and strings easily can be reverted to their original view. Recommended to enable this option only for small source code. \n\n## Preset Options\n### High obfuscation, low performance\n\nThe performance will be much slower than without obfuscation\n\n```javascript\n{\n    compact: true,\n    controlFlowFlattening: true,\n    controlFlowFlatteningThreshold: 1,\n    deadCodeInjection: true,\n    deadCodeInjectionThreshold: 1,\n    debugProtection: true,\n    debugProtectionInterval: 4000,\n    disableConsoleOutput: true,\n    identifierNamesGenerator: 'hexadecimal',\n    log: false,\n    numbersToExpressions: true,\n    renameGlobals: false,\n    selfDefending: true,\n    simplify: true,\n    splitStrings: true,\n    splitStringsChunkLength: 5,\n    stringArray: true,\n    stringArrayCallsTransform: true,\n    stringArrayEncoding: ['rc4'],\n    stringArrayIndexShift: true,\n    stringArrayRotate: true,\n    stringArrayShuffle: true,\n    stringArrayWrappersCount: 5,\n    stringArrayWrappersChainedCalls: true,    \n    stringArrayWrappersParametersMaxCount: 5,\n    stringArrayWrappersType: 'function',\n    stringArrayThreshold: 1,\n    transformObjectKeys: true,\n    unicodeEscapeSequence: false\n}\n```\n\n### Medium obfuscation, optimal performance\n\nThe performance will be slower than without obfuscation\n\n```javascript\n{\n    compact: true,\n    controlFlowFlattening: true,\n    controlFlowFlatteningThreshold: 0.75,\n    deadCodeInjection: true,\n    deadCodeInjectionThreshold: 0.4,\n    debugProtection: false,\n    debugProtectionInterval: 0,\n    disableConsoleOutput: true,\n    identifierNamesGenerator: 'hexadecimal',\n    log: false,\n    numbersToExpressions: true,\n    renameGlobals: false,\n    selfDefending: true,\n    simplify: true,\n    splitStrings: true,\n    splitStringsChunkLength: 10,\n    stringArray: true,\n    stringArrayCallsTransform: true,\n    stringArrayCallsTransformThreshold: 0.75,\n    stringArrayEncoding: ['base64'],\n    stringArrayIndexShift: true,\n    stringArrayRotate: true,\n    stringArrayShuffle: true,\n    stringArrayWrappersCount: 2,\n    stringArrayWrappersChainedCalls: true,\n    stringArrayWrappersParametersMaxCount: 4,\n    stringArrayWrappersType: 'function',\n    stringArrayThreshold: 0.75,\n    transformObjectKeys: true,\n    unicodeEscapeSequence: false\n}\n```\n\n### Low obfuscation, High performance\n\nThe performance will be at a relatively normal level\n\n```javascript\n{\n    compact: true,\n    controlFlowFlattening: false,\n    deadCodeInjection: false,\n    debugProtection: false,\n    debugProtectionInterval: 0,\n    disableConsoleOutput: true,\n    identifierNamesGenerator: 'hexadecimal',\n    log: false,\n    numbersToExpressions: false,\n    renameGlobals: false,\n    selfDefending: true,\n    simplify: true,\n    splitStrings: false,\n    stringArray: true,\n    stringArrayCallsTransform: false,\n    stringArrayEncoding: [],\n    stringArrayIndexShift: true,\n    stringArrayRotate: true,\n    stringArrayShuffle: true,\n    stringArrayWrappersCount: 1,\n    stringArrayWrappersChainedCalls: true,\n    stringArrayWrappersParametersMaxCount: 2,\n    stringArrayWrappersType: 'variable',\n    stringArrayThreshold: 0.75,\n    unicodeEscapeSequence: false\n}\n```\n\n### Default preset, High performance\n\n```javascript\n{\n    compact: true,\n    controlFlowFlattening: false,\n    deadCodeInjection: false,\n    debugProtection: false,\n    debugProtectionInterval: 0,\n    disableConsoleOutput: false,\n    identifierNamesGenerator: 'hexadecimal',\n    log: false,\n    numbersToExpressions: false,\n    renameGlobals: false,\n    selfDefending: false,\n    simplify: true,\n    splitStrings: false,\n    stringArray: true,\n    stringArrayCallsTransform: false,\n    stringArrayCallsTransformThreshold: 0.5,\n    stringArrayEncoding: [],\n    stringArrayIndexShift: true,\n    stringArrayRotate: true,\n    stringArrayShuffle: true,\n    stringArrayWrappersCount: 1,\n    stringArrayWrappersChainedCalls: true,\n    stringArrayWrappersParametersMaxCount: 2,\n    stringArrayWrappersType: 'variable',\n    stringArrayThreshold: 0.75,\n    unicodeEscapeSequence: false\n}\n```\n\n\u003C!-- ##options-end## -->\n\n## Obfuscator.io Pro Options\n\n> :warning: **The following VM obfuscation\u002FPro options are available only via the [Obfuscator.io Pro API](https:\u002F\u002Fobfuscator.io\u002F).**\n>\n> To use these options, you need a Pro API token from [obfuscator.io](https:\u002F\u002Fobfuscator.io) and must call the `obfuscatePro()` method instead of `obfuscate()`. See the [Pro API Methods](#shield-pro-api-methods-vm-obfuscation) section for details.\n\n### `vmObfuscation`\nType: `boolean` Default: `false`\n\nEnables VM-based bytecode obfuscation. When enabled, JavaScript functions are compiled into custom bytecode that runs on an embedded virtual machine. This provides the highest level of protection as the original code logic is completely transformed.\n\n**Example:**\nYour readable code like `return qty * price` becomes a list of numbers like `[0x15,0x03,0x17,...]` that only the embedded VM interpreter can execute. The original logic is no longer visible as JavaScript.\n\n### `vmTargetFunctions`\nType: `string[]` Default: `[]`\n\nSpecify exactly which root-level functions should get VM protection by name.\n\n**Example:**\n```javascript\n{\n  vmObfuscation: true,\n  vmTargetFunctions: ['someFunctionName']\n}\n```\n\n**Result:** Only these three functions get VM-protected. Everything else stays as regular (but still obfuscated) JavaScript. Perfect for protecting sensitive license checks or authentication logic while keeping the rest of your code lean.\n\n### `vmExcludeFunctions`\nType: `string[]` Default: `[]`\n\nSpecify root-level functions that should never get VM protection. Takes precedence over other settings.\n\n**Example:**\n```javascript\n{\n  vmObfuscation: true,\n  vmExcludeFunctions: ['someFunctionName']\n}\n```\n\n**When to use:**","JavaScript Obfuscator 是一个针对 JavaScript 和 Node.js 的强大混淆工具。它支持变量和函数重命名、字符串混淆以及控制流扁平化等核心功能，能够有效提高代码的安全性，防止逆向工程。该项目采用 TypeScript 开发，具备多种混淆技术，包括变量名替换、字符串加密及控制流变换等，并且通过其在线服务 Obfuscator.io 提供了基于虚拟机的字节码混淆选项，进一步增强了保护强度。适用于需要对前端或后端 JavaScript 代码进行保护的各种场景，特别是当涉及到敏感逻辑或商业秘密时。",2,"2026-06-11 02:56:36","top_language"]