javascript-obfuscator 5.0.1 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  Change Log
2
2
 
3
+ v5.1.0
4
+ ---
5
+ * Add `version` parameter to the `apiConfig` to use different versions JavaScript Obfuscator Pro via API
6
+
3
7
  v5.0.1
4
8
  ---
5
9
  * Add JavaScript Obfuscator PRO advertisement message
package/README.md CHANGED
@@ -308,6 +308,7 @@ console.log(result.getObfuscatedCode());
308
308
  * `apiConfig` (`Object`) – Pro API configuration:
309
309
  * `apiToken` (`string`, required) – your API token from obfuscator.io
310
310
  * `timeout` (`number`, optional) – request timeout in ms (default: `300000` - 5 minutes)
311
+ * `version` (`string`, optional) – JavaScript Obfuscator Pro version to use (e.g., `'5.0.0-beta.20'`). Defaults to latest version if not specified.
311
312
  * `onProgress` (`function`, optional) – callback for progress updates during obfuscation
312
313
 
313
314
  **Returns:** `Promise<ObfuscationResult>`
@@ -317,6 +318,24 @@ console.log(result.getObfuscatedCode());
317
318
  - API token is invalid or expired
318
319
  - API request fails
319
320
 
321
+ ### Pro API with Specific Version
322
+
323
+ You can specify which obfuscator version to use via the `version` option:
324
+
325
+ ```javascript
326
+ const result = await JavaScriptObfuscator.obfuscatePro(
327
+ sourceCode,
328
+ {
329
+ vmObfuscation: true,
330
+ vmObfuscationThreshold: 1
331
+ },
332
+ {
333
+ apiToken: 'your_javascript_obfuscator_pro_api_token',
334
+ version: '5.0.0-beta.20' // Use specific version
335
+ }
336
+ );
337
+ ```
338
+
320
339
  ### Pro API with Progress Updates
321
340
 
322
341
  The API uses streaming mode to provide real-time progress updates during obfuscation: