📘Proxy

JSobjectbuilt-in ⟩ Proxy

A Proxy wraps another object/function and intercepts

// ⭐️ proxy should shadow the original (target) object/function.
obj = new Proxy(obj, {
    // handler methods
    __proto__: null,     // prevent from inheriting unnecessary methods.
});

a Proxy object doesn't have own properties.

JavaScript enforces some invariants – conditions that must be fulfilled by internal methods and traps. 📗 javascript.info

Last updated