JavaScript/TypeScript

Sponsored links
JavaScript/TypeScript

How to implement efficient Least Recently Used cache (LRU) in TypeScript

This post is the output of this book. If you want to check all the code, go to my repository. What is cache? Cache is a ...
JavaScript/TypeScript

How to write clean if-else statements

if-else statements can easily be nested and make the code unreadable if we don't consider anything to write it. if-else ...
JavaScript/TypeScript

Read all files and subdirectories in iterative call

I needed to implement a function that reads all the files and the subdirectories. Many frameworks offer such a function ...
JavaScript/TypeScript

TypeScript/JavaScript Filter array of objects by property value

An array often needs to be filtered by a condition. That can easily be done filter function that is implemented in Array...
JavaScript/TypeScript

JavaScript replaceAll multiple characters and strings

replaceAll was added to ECMAScript2021. The same thing can be done with replace function but the name is clearer for the...
JavaScript/TypeScript

Node.js + C# (Edge.js) How to investigate Memory Leak

It's hard to find the root cause when we find a memory leak in software. If you have no clue, it's better to start profiling the code. A tool helps the investigation.
JavaScript/TypeScript

How to sort Array if it contains number string and string data in JavaScript

Doesn't Array.sort output as you expected? It's because number is handled as string by default. If you want to sort the array on your needs, you need to write your own sorting logic.
JavaScript/TypeScript

Implementing Treap data structure in TypeScript

This post explains what Treap is and how it can be implemented in detail. It is often used for the implementation of dictionary and set. It's worth knowing.
JavaScript/TypeScript

TypeScript Remove elements from an object array

Remove method doesn't exist on Array interface. So we need to implement it ourselves. This article explains how to remove elements from number/string/object array.
JavaScript/TypeScript

Implementation of D Way Heap in TypeScript (Binary Tree)

Explains how D-way heap works and how it can be implemented in TypeScript. If you need to update/remove an element, it does it in a very short time.
Sponsored links