obfuscate-my-code
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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.

Dependencies (8)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i obfuscate-my-code

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    13.8 kB

    Total Files

    12

    Last publish

    Collaborators

    • hz-rd