Hacking the JavaScript using Proxies and Reflection || Hacking JS with Proxy || Erick Wendel
The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object. If you have watched my video about the JavaScript decorators proposal you'll find this very alike. Decorators and the Proxy object have the same goal. They help us intercept and/or override behaviors in Functions, classes, or objects. We're gonna build an application to inspect how long a function takes to finish and print it out on the screen by just decorating our function with an extension We'll also use metaprogramming practices by using the JavaScript Reflect object to retrieve class names, functions, and much more. Are you ready? Then let's begin. ✅ LINKS ▸Source code: https://github.com/ErickWendel/hackin... ▸Mastering Node.js Streams Training: https://bit.ly/nodejs-streams-training ▸ Telegram channel: https://bit.ly/ErickWendelContentHub ▸ My courses: http://bit.ly/ew-courses-yt ▸ https://developer.mozilla.org/en-US/d... ▸ https://developer.mozilla.org/en-US/d... ▸ https://www.keithcirkel.co.uk/metapro... ✅ FOLLOW ME ▸ Linkedin: / erickwendel ▸ Blog: https://erickwendel.com.br/ ▸ Facebook: https://fb.com/page.erickwendel ▸ Medium: / erickwendel ▸ Twitter: / erickwendel_ ✅ TIMELINE 00:00 - SUBSCRIBE NOW 00:03 - Introduction 01:00 - Content about Node.js and JavaScript 01:28 - The node.js version required for this class 01:37 - Creating a JavaScript class 03:01 - Intercepting a function using JS Proxies 04:50 - Simulating the behavior of Decorators with the JS Proxy 06:53 - Getting all the function names using the Reflect Object 07:56 - Using the Proxy object to intercept functions (hack!) 10:19 - Intercepting properties or objects with proxy 10:48 - Getting how long a function took to finish 11:31 - Final considerations 13:07 - Thank you! #JavaScriptHacking #ProxyProgramming #ReflectionProgramming #ErickWendel #WebSecurity #WebDevelopment #SoftwareDevelopment #FrontendDevelopment #BackendDevelopment #JavaScriptTricks #JSProgramming #JSDevelopment #JavaScriptTips #ProgrammingTips #CodingTips #WebDevTips #WebDevTricks #CodeOptimization #CodeEfficiency #CodeImprovement #CodeDebugging #WebSecurityTips #WebSecurityTricks #ProgrammingCommunity #CodingCommunity #CodeNewbie #ProgrammingConcepts #ProgrammingTechniques #CodeDecorators

What's new in the native Node.js Test Runner 2022

Actual use case for JavaScript PROXY!

5 Tips I Wish Someone Had Told Me When I Started Programming || Programming || Erick Wendel

Creating a Performance Monitor using JavaScript Decorators || JS Decorators || Erick Wendel

Dependency Injection Container With & Without Reflection API Autowiring - Full PHP 8 Tutorial

Microsoft's Greed is Finally Backfiring

The JSON API as you know will change soon. Here's Why | ECMAScript2023

Node.js Just Got a BIG Boost with Native TypeScript Support

John Lindquist - Javascript Proxies - Unlock the Proxy Power

Knife Expert: Real Knife Defense Is TERRIFYING

Strict TypeScript Isn't Enough Anymore

JavaScript Pro Tips - Code This, NOT That

Implementing a Proxy state like valtio

Read 30GB+ Data in the Browser Without Blocking the Screen || Webstreams 101 || Erick Wendel

The Insane Genius of a Formula 1 Gearbox

JavaScript Visualized - Promise Execution

If You Have A Bad Memory, I’ll Help You Fix It In 28 Minutes

Why the Mongols Vanished After Conquering Everything

How AI agents & Claude skills work (Clearly Explained)

