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

jscrambler-loader

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jscrambler-loader

jscrambler module loader for webpack

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

jscrambler

jscrambler-loader

Add obfuscation to your build process with webpack and jscrambler-loader.

DISCLAIMER: If you are looking for Jscrambler 3.8 or below please go to this page.

How to Use

Install

Install the Jscrambler webpack loader.

npm install -D jscrambler-loader

Option -D will make sure it is installed as a devDependency.

Setup your .jscramblerrc config file

In order to start using jscrambler-loader you will need to setup your configuration file named .jscramblerrc. This file will contain all the necessary options for your application protection.

You may put your config file in one of these directories.

Here's an example of how your .jscramblerrc file should look like:

// .jscramblerrc
{
  "keys": {
    "accessKey": "XXXXXX",
    "secretKey": "XXXXXX"
  },
  "applicationId": "XXXXXXXXXXXX",
  "params": [
    {
      "name": "whitespaceRemoval"
    },
    {
      "name": "charToTernaryOperator"
    }
  ]
}

You will need your credentials and Application ID in order to protect your application. Navigate to your profile page and grab your accessKey and secretKey at the API Credentials section.

Your applicationId can be found inside your application page just below your application name. Click the copy to clipboard icon to copy the applicationId.

copy

You can also grab your current configuration on your application page. This will download a .json file containing a valid configuration with your currently selected options.

download config file location

Keep in mind that the params object is optional and if it is not provided we will use your previous configuration.

Webpack Config

This is a simple example on how to add jscrambler-loader to your webpack configuration:

// webpack.config.js

module.exports = {
  entry: './index.js',
  output: {
    filename: 'bundle.js'
  },
  module: {
    loaders: [
     {
       test: /\.js$/,
       exclude: /node_modules/,
       loader: 'jscrambler-loader'
     }
   ]
  }
};

This will use your .jscramblerrc as your Jscrambler protection configuration.

You can find some working examples here

Keywords

FAQs

Package last updated on 08 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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