r/programming • u/ythl • 2d ago
How to Gaslight JavaScript Programmers
https://www.bryanpg.com/articles/pragma-twice/proxy.html
36
Upvotes
3
u/LukeLC 1d ago
I actually love JS proxies. The most common use-case I come across is when you need an object to default undefined values to something standard/safe. It's also not so complicated as the author makes it sound to reverse-engineer and learn what its capabilities are. The developer console makes it plain that it is a proxy, and you can easily jump to its definition from there.
0
1
13
u/erik240 2d ago
Well, the moment you think something doesn’t seem right … you set a breakpoint before the property access.