From 48cd4ebe158a935e30ade15d164c340f66d64bdf Mon Sep 17 00:00:00 2001 From: Aastha Bist Date: Thu, 18 Aug 2022 07:17:37 +0530 Subject: [PATCH] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index dc72d685..7825eaf3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/PiotrDabkowski/Js2Py.svg?branch=master)](https://travis-ci.org/PiotrDabkowski/Js2Py) [![Downloads](https://pepy.tech/badge/js2py/month)](https://pepy.tech/project/js2py) -#### Pure Python JavaScript Translator/Interpreter +# Js2Py - Pure Python JavaScript Translator/Interpreter Everything is done in 100% pure Python so it's extremely easy to install and use. Supports Python 2 & 3. Full support for ECMAScript 5.1, ECMA 6 support is still experimental.
@@ -64,13 +64,13 @@ Every feature of ECMA 5.1 is implemented (except of 'with' statement): ``` Unfortunately even though Js2Py can be generally used to translate huge Js files (over 50k lines long), in rare cases you may encounter some unexpected problems (like javascript calling a function with 300 arguments - python allows only 255). These problems are very hard to fix with current translation approach. I will try to implement an interpreter in near future which will hopefully fix all the edge cases. -#### Installation +## Installation pip install js2py
-#### More advanced usage example +## More advanced usage example It is possible to access all the variables from JS scope using EvalJs. Moreover, you can use Python objects from your JavaScript code if you add them to the scope. In this example we will be using Python built-in sum function to sum elements in JS array. It will stand under python_sum. @@ -113,7 +113,7 @@ You can also enable require support in JavaScript like this: ```
-### JavaScript 'VirtualMachine' in Python +# JavaScript 'VirtualMachine' in Python As a fun experimental project I have also implemented a VM-based JavaScript (yes - there are 2 separate JS implementations in this repo). It is feature complete and faster than the translation based version. @@ -174,7 +174,7 @@ This is just a curiosity and I do not recommend using VM in practice (requires m
-#### Limitations +## Limitations There are 3 main limitations: