How to use the jsbeautifier.unpackers.evalbased.unpack function in jsbeautifier

To help you get started, we’ve selected a few jsbeautifier examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ctxis / CAPE / lib / cuckoo / common / peepdf / jsbeautifier / unpackers / __init__.py View on Github external
def run(source, evalcode=False):
    """Runs the applicable unpackers and return unpacked source as a string."""
    for unpacker in [mod for mod in UNPACKERS if mod.detect(source)]:
        source = unpacker.unpack(source)
    if evalcode and evalbased.detect(source):
        source = evalbased.unpack(source)
    return source
github beautify-web / js-beautify / python / jsbeautifier / unpackers / __init__.py View on Github external
def run(source, evalcode=False):
    """Runs the applicable unpackers and return unpacked source as a string."""
    for unpacker in [mod for mod in UNPACKERS if mod.detect(source)]:
        source = unpacker.unpack(source)
    if evalcode and evalbased.detect(source):
        source = evalbased.unpack(source)
    return source
github akalongman / sublimetext-codeformatter / codeformatter / lib / jsbeautifier / unpackers / __init__.py View on Github external
def run(source, evalcode=False):
    """Runs the applicable unpackers and return unpacked source as a string."""
    for unpacker in [mod for mod in UNPACKERS if mod.detect(source)]:
        source = unpacker.unpack(source)
    if evalcode and evalbased.detect(source):
        source = evalbased.unpack(source)
    return source