Coder Social home page Coder Social logo

obfuscate-my-code's Introduction

Obfuscate My Code

You can use this to obfuscate (AND, OR) minify your project files so it can't be easily stolen or to make it very hard to read.

Installation

npm

 $ npm i obfuscate-my-code --save-dev

yarn

 $ yarn add obfuscate-my-code --save-dev

pnpm

 $ pnpm add obfuscate-my-code --save-dev

Example Code

Typescript :

import path from 'path';
import { OBFMC } from 'obfuscate-my-code';

const obf: OBFMC = new OBFMC();
obf.silentLog = true; // Default is false
obf.obfuscate('js', path.join(__dirname, '/mycodedir/'), 'browser');
obf.minifyDir(path.join(__dirname, '/i/want/to/minify/this/dir/'));

Javascript :

const path = require('path');
const { OBFMC } = require('obfuscate-my-code');

const obf = new OBFMC();
obf.silentLog = true; // Default is false
obf.obfuscate('js', path.join(__dirname, '/mycodedir/'), 'browser');
obf.minifyDir(path.join(__dirname, '/i/want/to/minify/this/dir/'));

About obfuscate() last argument

Last argument of obfuscate() function is the options of the obfuscater and how it will obfuscate your files, It's optional there's options by default. But if you want to change it see https://obfuscator.io/ all the options of the page is the same as the argument.

Default Options :

{
    compact: true,
    simplify: true,
    stringArray: true,
    stringArrayRotate: true,
    stringArrayShuffle: true,
    stringArrayThreshold: 0.75,
    stringArrayIndexShift: true,
    stringArrayIndexesType: ['hexadecimal-number'],
    stringArrayWrappersCount: 1,
    stringArrayWrappersType: 'variable',
    stringArrayWrappersChainedCalls: true,
    target: obfuscateTargetType,
    seed: 0,
    deadCodeInjection: false,
}

If you get any bug please let me know in the issues page.

obfuscate-my-code's People

Contributors

re1yu avatar

Stargazers

i4de avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.