js2py

1.0.3-3 • Public • Published

Converts JavaScript to Python

Proof of concept, converting JS to Python, for example:

const BigN = require('bignumber.js')
 
class Calculator extends MathDevice {
  constructor (args = []) {
    super({})
  }
 
  static max (a, b) {
    return BigN.max(a, b)
  }
}

into

class Calculator(MathDevice):
  def __init__(self, args = []):
    super().__init__({})
 
  def add(self, a, b):
    return max(a, b)

/js2py/

    Package Sidebar

    Install

    npm i js2py

    Weekly Downloads

    3

    Version

    1.0.3-3

    License

    MIT

    Unpacked Size

    138 kB

    Total Files

    20

    Last publish

    Collaborators

    • zaoqi