es-discuss Digest, Vol 95, Issue 45

Fabrício Matté ultcombo at
Mon Jan 19 05:32:34 PST 2015

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list