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
๐Ÿ‘€ 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
CHALLENGE

class Calculator {
constructor(value) {
this.value = value;
}

add(num) {
this.value += num;
return this;
}

getValue = () => this.value;
}

const calc = new Calculator(10);
const addMethod = calc.add;
const getValueMethod = calc.getValue;

addMethod.call({value: 5}, 3);
console.log(calc.getValue());
console.log(getValueMethod());
โค5๐Ÿ‘2๐Ÿ”ฅ2๐Ÿคฉ2
What is the output?
Anonymous Quiz
21%
10 8
45%
10 10
27%
8 10
8%
13 13
๐Ÿ‘3โค2
๐Ÿ˜ฎ npmx: A New npm Registry Package Browser

A smooth, fast way to browse packages on the official npm registry. Itโ€™s certainly fast, smooth, and you see more info up front and center - check out the axios page for example. โ€œWeโ€™re not replacing the npm registry, but instead providing an elevated developer experience through a fast, modern UI.โ€

npmx
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ”ฅ5โค2๐Ÿ‘2๐Ÿคฃ1
CHALLENGE

const wm = new WeakMap();
const obj1 = { name: 'Sarah' };
const obj2 = { name: 'Mike' };

wm.set(obj1, 'developer');
wm.set(obj2, 'designer');

console.log(wm.get(obj1));
console.log(wm.has(obj2));
console.log(wm.get({ name: 'Sarah' }));
console.log(wm.delete(obj1));
console.log(wm.has(obj1));
โค4๐Ÿ”ฅ2๐Ÿ‘1