JavaScript
33K subscribers
1.14K photos
10 videos
33 files
814 links
A resourceful newsletter featuring the latest and most important news, articles, books and updates in the world of #javascript πŸš€ Don't miss our Quizzes!

Let's chat: @nairihar
Download Telegram
πŸ‘€ Heat.js 5.0: A Flexible Heat Map Rendering Solution

Generate customized interactive heatmaps (think GitHub contributions graph), or render heatmaps as lines and bar charts. The site is packed with demos to enjoy. GitHub repo.

William Troup
Please open Telegram to view this post
VIEW IN TELEGRAM
❀9πŸ”₯8πŸ‘5
CHALLENGE

const target = { name: "Sarah", age: 25 };

const handler = {
get(obj, prop) {
if (prop === 'greeting') {
return `Hello, I'm ${obj.name}`;
}
return obj[prop]?.toString().toUpperCase() || 'UNKNOWN';
},

set(obj, prop, value) {
if (typeof value === 'string') {
obj[prop] = value.toLowerCase();
} else {
obj[prop] = value * 2;
}
return true;
}
};

const proxy = new Proxy(target, handler);
console.log(proxy.name);
proxy.city = "Boston";
proxy.score = 15;
console.log(proxy.greeting);
console.log(proxy.city + " " + proxy.score);
πŸ‘16❀6πŸ”₯4
πŸŒͺ GitHub is exploring solutions to tackle low-quality contributions, which could include giving you the option to disable PRs entirely or at least restrict them to collaborators. Got opinions? Join the discussion.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘7❀5πŸ”₯4
CHALLENGE

class DataProcessor {
static #cache = new Map();
static #initialized = false;

static {
console.log('First block');
this.#cache.set('default', 'value1');
}

static {
console.log('Second block');
this.#cache.set('config', 'value2');
this.#initialized = true;
}

static getStatus() {
return `${this.#cache.size}-${this.#initialized}`;
}
}

console.log(DataProcessor.getStatus());
πŸ‘4❀3
πŸ‘€ Introducing LibPDF: PDF Parsing and Generation from TypeScript

LibPDF bills itself as β€˜the PDF library TypeScript deserves’ and supports parsing, modifying, signing and generating PDFs with a modern API in Node, Bun, and the browser. GitHub repo.

Documenso
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘10❀9πŸ”₯4
CHALLENGE

const obj1 = { a: 1, b: { c: 2 } };
const obj2 = { ...obj1 };
const obj3 = obj1;

obj2.a = 10;
obj2.b.c = 20;
obj3.b.c = 30;

console.log(obj1.a);
console.log(obj1.b.c);
console.log(obj2.a);
console.log(obj2.b.c);
console.log(obj3.a);
console.log(obj3.b.c);
❀5πŸ‘1πŸ”₯1
❀5πŸ”₯3πŸ‘1
🌲 The State of JavaScript 2025: Backend Frameworks

The results of the popular annual JavaScript survey are out, and we’re focusing on the most relevant bit to Node.js: backend frameworks. Express still leads the way, but NestJS continues to grow rapidly. Meanwhile, Hono comes top in developer satisfaction.

Devographics
Please open Telegram to view this post
VIEW IN TELEGRAM
❀5πŸ‘4πŸ”₯3
CHALLENGE

function memoize(fn) {
const cache = new Map();
return function(...args) {
const key = JSON.stringify(args);
if (cache.has(key)) {
return cache.get(key);
}
const result = fn.apply(this, args);
cache.set(key, result);
return result;
};
}

const fibonacci = memoize(function(n) {
if (n <= 1) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
});

console.log(fibonacci(10));
console.log(fibonacci.cache?.size || 'undefined');
πŸ”₯5πŸ‘3❀1
❀2πŸ‘2πŸ”₯2
🌲 An Advanced Retry Mechanism in Node.js with Kafka

Have you ever wondered how systems are designed to ensure reliable event delivery and processing? How can we minimise event loss to a very low level: or even achieve near-zero message loss and highly reliable processing?

nairihar
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯9❀6πŸ‘3
CHALLENGE

console.log('1');

setTimeout(() => console.log('2'), 0);

Promise.resolve().then(() => console.log('3'));

console.log('4');

Promise.resolve().then(() => {
console.log('5');
setTimeout(() => console.log('6'), 0);
});

console.log('7');
❀1πŸ‘1πŸ”₯1
❀12🀣3
πŸ₯ΆπŸŒ² TypeScript 6.0 enters beta, but what does it mean for Node developers?

TypeScript 6.0 is now in beta. It's a "clean up your tsconfig" release, not meant to wow but to make sense as a bridge to the eventual Go-powered 'native' TypeScript 7 compiler.
Please open Telegram to view this post
VIEW IN TELEGRAM
❀5πŸ‘4πŸ”₯3
πŸ‘€ Transformers.js v4 Preview Released

Transformers.js brings Hugging Face’s transformer models directly to the JavaScript world, meaning you can run numerous NLP, vision, and audio models right from Node.js. v4 is WebGPU powered and is now installable with npm.

Hugging Face
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5πŸ”₯5❀2
CHALLENGE

const operations = {
value: 10,
multiply: function(x) {
return this.value * x;
},
arrow: (x) => {
return this.value * x;
},
nested: function() {
const inner = () => this.value * 2;
return inner();
}
};

console.log(operations.multiply(3));
console.log(operations.arrow(3));
console.log(operations.nested());
πŸ‘6πŸ”₯4
❀2πŸ”₯2
🀩 broz (above) is a simple Node/Electron tool you can use via npx if you're tired of fidgeting around to get a screenshot of a site with a clean look. From the maintainer of Shiki.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯6❀5πŸ‘3