Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-obfuscator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-obfuscator - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

bin/jsobfuscate

1

jsObfuscate.js

@@ -168,1 +168,2 @@ var Q = require('q');

module.exports = obfuscate;
module.exports.defaultOptions = sanitizeOptions();
{
"name": "js-obfuscator",
"version": "0.0.0",
"version": "0.0.1",
"description": "Obfuscate JavaScript files via javascriptobfuscator.com. This is also a Grunt plugin.",

@@ -10,2 +10,5 @@ "main": "jsObfuscate.js",

},
"bin": {
"jsobfuscate": "bin/jsobfuscate"
},
"keywords": [

@@ -37,2 +40,3 @@ "JavaScript",

"files": [
"bin",
"tasks",

@@ -39,0 +43,0 @@ "jsObfuscate.js",

48

README.md

@@ -5,8 +5,23 @@ js-obfuscator

Obfuscate JavaScript files via [javascriptobfuscator.com](
http://www.javascriptobfuscator.com/). This is also a Grunt plugin.
http://www.javascriptobfuscator.com/).
## Getting Started
You can install it globally as a command:
This plugin requires Grunt `~0.4.0`
```
npm install -g js-obfuscator
echo "var fs = require('fs')" | jsobfuscate -o keepIndentations=false
var _0x40c7=["\x66\x73"];var fs=require(_0x40c7[0]);
```
Or install it as a dependency:
```
npm install js-obfuscator --save
var jsObfuscator = require('js-obfuscator');
jsObfuscator ( <string> input [, <object> options ] )
Returns: a Q promise.
```
Or you can use it with Grunt `~0.4.0`:
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out

@@ -29,10 +44,2 @@ the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains

## Call
```
var jsObfuscator = require('js-obfuscator');
jsObfuscator ( <string> input [, <object> options ] )
```
Returns: a Q promise.
## Options

@@ -64,2 +71,21 @@

## Command
```
$ jsobfuscate -h
Usage: jsobfuscate [OPTIONS] [FILES]
Obfuscate JavaScript files via javascriptobfuscator.com.
Read from STDIN if no files specified.
Default Options:
-o keepLinefeeds=false
-o keepIndentations=false
-o encodeStrings=true
-o encodeNumbers=true
-o moveStrings=true
-o replaceNames=true
-o variableExclusions="['^_get_', '^_set_', '^_mtd_']"
```
## Examples

@@ -66,0 +92,0 @@

@@ -17,3 +17,3 @@ var async = require('async');

var content = task.src.map(function(src) {
return grunt.file.read(src);
return grunt.file.read(src).replace(/^\#\!.*/, '');
}).join('\n;\n')

@@ -20,0 +20,0 @@ jsObfuscate(content, options).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc