Skip to content

cusspvz/c4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c4

🔥 a javascript engine burster error handler

Burst [nodejs] or a [browser] engine in case an hacking error was detected.

Installation

npm i --save c4

Usage

In case you catch an error

var C4 = require( 'c4' )

var bomb = new C4({
    delay: 20 // ms
})

function someMethod ( variable ) {
    try{
        if ( variable === 'hacking' ) {
            throw new Error( "Hacking errorr!!!!!" )
        }
    }catch(err) {
        report(function () {
            document.body.innerHtml = "i know what you did boy... reported!!"
            bomb.explode()
        })
    }
}

Options

{
    wipeGlobal: true,
    wipeDocument: true,
    wipeRequire: true,
    delay: 300,
}

About

🔥 a javascript engine burster

Resources

License

Stars

Watchers

Forks

Packages

No packages published