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 ... 2024.02.28 JavaScript/TypeScript
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 ... 2023.10.23 JavaScript/TypeScript
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 ... 2023.09.06 JavaScript/TypeScript
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... 2023.05.22 JavaScript/TypeScript
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... 2023.05.19 JavaScript/TypeScript
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. 2023.04.21 JavaScript/TypeScriptTips
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. 2023.01.20 JavaScript/TypeScript
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. 2022.12.21 JavaScript/TypeScript
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. 2022.11.23 JavaScript/TypeScript
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. 2022.11.07 JavaScript/TypeScript