#javascript
Posts and snippets tagged #javascript.
rss feed ↗posts
Does JavaScript Promise.all() run in parallel or sequential?
JavaScript is a single-threaded programming language, so it can't run multiple things at the same time, Promise.all() actually runs promises concurrently, not in parallel!. Let's dive in to see how it works.
Drag and Drop API keynotes
Some keynotes to keep in mind when working with Drag and Drop APIs in Javascript
Tricky use case of Array.prototype.map in JS
If you are familiar with functional programming, Array.prototype.map must be a function that you work with every day. We encountered a tricky use case of it at Cốc Cốc recently, it took me a while to figure out, and here's the answer...
When to use Function Declaration vs Function Expression in JavaScript?
Learn about the differences between Function Declaration and Function Expression in JavaScript, including their definitions, hoisting behavior, and when to use each method.
Simplify your Node.js project with module aliases
Tired of dealing with complex file paths in your Node.js project? Learn how to set up module aliases using TypeScript and module-alias package to simplify your imports and improve your development experience.
snippets
Casing utilities
A various ready-to-use string casing utilities in Typescript.
Deep remove falsy
Recursively removes all falsy values (null, undefined, 0, false) from an object and its nested properties.
Event Emitter
A lightweight pub/sub mechanism to handle custom events without adding a full-blown library.
VNese to plain English
Convert Vietnamese text to plain English by replacing accented characters with their equivalents.