Stateful Logic Reuse ft. Composables"Argh... The duplication. Let's remove it" - Says every software developer. Code reuse is arguably one of the most satisfying experiences of a developer's life. Since it leads to lesser code to manage! Composables enable us to reuse stateful logic ...Jan 6, 2024 · 3 min readnaumanzafar.dev
Maps vs. ObjectsWant to store data as key-value pairs? Maps & Objects are the possible solutions. Let's say you want to store information about a person // Objects const person = { name: 'Nauman', age: 30 } person.age // 30 // Maps const personUsingMap = new Map();...Jan 30, 2023 · 2 min readnaumanzafar.dev
What are Proxy Objects & how I learnt about them?I have been working on a third-party script for a client where we needed to detect headless browsers to prevent automated or controlled requests from making their way to our final data which is critical for so many reasons. Puppeteer is a Node librar...Jan 27, 2023 · 3 min readnaumanzafar.dev
First understand scope; said old closurelet age = 10; console.log(age); // logs 10 Scope manages the accessibility of variables. Since the definition of age (line # 1) & accessing it (line # 2) are within the same scope. It works! In JavaScript, a new scope is created by a function or a ...Dec 12, 2022 · 2 min readnaumanzafar.dev
My fancy name is Higher Order Function!They label me from higher order, but I don't forget my roots, I am still a function that simply operates on other functions! Functions that operate on other functions, either by taking them as arguments or by returning them, are called higher-order ...Dec 8, 2022 · 1 min readnaumanzafar.dev