lebab / lebab

Turn your ES5 code into readable ES6. Lebab does the opposite of what Babel does.

Home Page:https://lebab.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class transform does not work in Wagner project

marvelsrp opened this issue · comments

I try convert https://github.com/marvelsrp/Wagner/blob/master/Wagner.base.js to ES6.
The result is not satisfactory

You should be more specific than that.

  • Does Lebab introduce any bugs in your code?
  • Does it transform something that it shouldn't?
  • Does it leave something untransformed when it should?

My guess is that you're expecting Lebab to transform all these prototype manipulations to ES6 classes...

  • Currently Lebab does not recognize inheritance which all of the "classes" in there seem to be using.
  • Additionally Lebab only handles the case where class is defined as a variable (e.g. it could recognize var SymmetricPass but it won't touch WAGNER.SymmetricPass).

The latter is more feasible to be fixed some time soon. Inheritance is a whole larger topic - there are so many possibilities for implementing it in ES5.

Changed the issue title to make the whole issue be about namespacing support.

Lack of inheritance support is covered by issue #33

Closing in favor of a duplicate issue: #146