Is it possible to enable EcmaScript 6 Harmony Proxies in nodejs? If so, what are the pros and cons? And is there any documentation on how to use them?
Thanks !
Is it possible to enable EcmaScript 6 Harmony Proxies in nodejs? If so, what
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Invoking node with
node --harmony-proxiesshould do the trick.Pros: proxies are a very powerful feature when you really need them.
Cons: proxies are a much too powerful feature when you don’t need them (which should be most of the time). Also, the implementation should still be regarded experimental.
As for documentation, all there really is atm is the Harmony wiki, in particular this page, which reflects the current implementation of proxies in V8 (and thus node):
http://wiki.ecmascript.org/doku.php?id=harmony:proxies