semvec/pypi-packages huggingface dataset:
jsemulator 0.7.4
JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python.
License: MIT

Translates JavaScript to Python code. jsemulator is able to translate and execute virtually any JavaScript code.

jsemulator is written in pure python and does not have any dependencies. Basically an implementation of JavaScript core in pure python.


    import jsemulator

    f = jsemulator.eval_js( "function $(name) {return name.length}" )

    f("Hello world")

    # returns 11

Now also supports ECMA 6 through jsemulator.eval_js6(js6_code)!