Development

Using RegEx groups for Search & replace in VS Code

VS Code has a nifty tool for doing search and replace using RegEx, which I prefer using whenever doing bulk…

10 months ago

How To Fix ReferenceError: __dirname is not defined

I recently tried to use __dirname inside a ES module. It turns out, that I cannot. It throws an error. So let us…

10 months ago

How to detect caps lock with JavaScript

The need to verify and notify the user if the Caps Lock key is on is fairly common. It is…

10 months ago

Creating new TypeScript types using template literal types

TypeScript is way more powerful than I give it credit for. I recently learned about creating new TypeScript types using…

10 months ago

React TypeScript: Simplify Imports with Path Aliases

As codebases grow larger and more complex in structure, imports can become unmanageable. As more directories are added, imports become…

11 months ago

Fix Cannot find module ‘fs’ or its corresponding type declarations.ts(2307)

I recently ran into the error "Cannot find module 'fs' or its corresponding type declarations.ts(2307)" while I was using VSCode…

11 months ago

Why should we not use index as key in React Lists

When working with React, developers often come across the need to render lists of items efficiently. Every item in a…

11 months ago

Delete git branches that do not exist on remote

After working on a project for a while, there will come a time when we will end up with a…

12 months ago

Partial Matching in Jest

Jest has the ability to check for partial matches on arrays and objects. Let us see how to do partial…

1 year ago

JSON.parse(): Fixing ‘SyntaxError: “[object Object]” is not valid JSON’

SyntaxError: "[object Object]" is not valid JSON: usually happens when the value being passed to JSON.parse is not a string…

1 year ago
Advertisements