
Implement groupBy From Scratch in JavaScript
Implement groupBy from scratch in JavaScript with reduce and a null-prototype object, then match Object.groupBy and Map.groupBy from ES2024. Node.js 24.
Tag
38 posts

Implement groupBy from scratch in JavaScript with reduce and a null-prototype object, then match Object.groupBy and Map.groupBy from ES2024. Node.js 24.

Build a router from scratch in JavaScript with path parameters, wildcards, HTTP methods, query strings, 404 and 405 answers and a Node.js server. Node.js 24.

Implement instanceof from scratch in JavaScript by walking the prototype chain, then cover primitives, Symbol.hasInstance, bound functions and known pitfalls.

Build a template engine from scratch in JavaScript with placeholders, nested paths, HTML escaping, loops and conditions, and no eval. Node.js 24.

Implement Function.prototype.bind from scratch in JavaScript, with partial arguments, new handling, length and name, and see what the polyfill cannot match.

Implement deepClone from scratch in JavaScript for objects, arrays, dates, maps, sets and circular references, and compare it with structuredClone. Node.js 24.

Build a tiny observable from scratch in JavaScript with subscribe, teardown, map and filter operators, completion and error handling, plus tests. Node.js 24.

Implement Promise.all from scratch in JavaScript, keeping result order, handling empty input, iterables, non-promise values and the first rejection. Node.js 24.

Implement the new operator from scratch in JavaScript as a function that links the prototype, runs the constructor and handles object return values.

Implement promisify from scratch in JavaScript to turn error-first callbacks into promises, with this, multiple results and util.promisify.custom.

Implement Object.create from scratch in JavaScript with a constructor trick and with setPrototypeOf, then add property descriptors and the null prototype case.

Implement Promise.any from scratch in JavaScript so it fulfills with the first success and rejects with an AggregateError when every input fails. Node.js 24.