Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to get an array out of a javascript proxy

Hi I was wondering if anyone knew how to get an array out of a proxy’s target value in JavaScript. I have something like this :

Proxy :
  [[target]] : Array // the array I need to extract
  [[handler]] : Object 
  [[IsRevoked]] : false

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

If all you have is a reference to the proxy, there is no way (by default) for you to get the proxy’s target. A specific proxy could provide a way (via one of its trap handlers, probably), but there is none by default.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading