Without proxy vs With proxy

Edit on GitHub

Setup

var a = {
        aProp: 0
        foo: function () { return this.aProp++;  }
    },
    b = { foo: function () { return a.foo(); } },
    bp = new Proxy(b)

Tests

  • Without proxy

    b.foo()
  • With proxy

    bp.foo()