context-proxy
context-proxy traps calls in exactly the same way as normal js Proxy, but this
context of every trap will be context
parameter of constructor or function call.
Usage
; const target = {}; // proxy target const context = /* context */; const proxy = ;// or with new operatorconst proxy = target /* handlers */ context;