Your second example may break if the constructor is called via `.call()`/`.apply()` or as a *CallExpression : MemberExpression* or if it has been `.bind()`ed. Although these may look like corner cases, a good transform should cover these cases, especially *CallExpression : MemberExpression* as it is very common in Node.js land to have constructors exported as properties of an exported object.
Btw, you're also missing a `return` before `this` in your "global" function body. /fm
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

