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-ythttps://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