All Questions
4
questions
0
votes
1
answer
33
views
Mocking an async builder pattern API with proxy
I'm trying to mock knex for testing. Everything seems to work but attaching a proxy to an array as prototype seems to remove the iteratability of arrays.
Here is the mock function. Following works ...
0
votes
0
answers
137
views
Proxy trap that applies to all objects?
I want to write a Proxy trap which applies to all objects. I'm trying to modify the behaviour of all JS objects using the set trap, by replacing a specific value with a predefined getter/setter pair.
/...
1
vote
1
answer
2k
views
Proxies: Calling static methods of target's parent when using a proxy object
Really interesting problem here for Javascripters
In Javascript, is possible to intercept when getting a property using proxies.
Also, with a small hack as shown below, is possible to intercept ...
4
votes
2
answers
3k
views
JavaScript pattern for constructing proxy objects, using classical inheritance
Although not finalized, I am experimenting with ES6 Proxies. My goal is to have a constructor function (one that utilizes classical inheritance like the one shown below) for creating proxy objects ...