Itβs time to fully wave goodbye to 2024, but not before Michael Rambeauβs annual analysis of which JavaScript projects fared best on GitHub over the past year. Even if you dislike GitHub stars as a metric for anything, this remains a great way to get a feel for the JavaScript ecosystem and see what libraries and tools have mindshare in a variety of niches. A fantastic roundup as always.
Michael Rambeau
Please open Telegram to view this post
VIEW IN TELEGRAM
π10β€2π₯2
CHALLENGE
var obj = { a: 10, b: 20 };
with (obj) {
var result = a + b;
}
console.log(result);
π4β€1
π€£23π7π€7β€4π₯2
An email parsing library happy in most JS runtimes. Takes the raw source of emails and parses them into their constituent parts.
Postal Systems
Please open Telegram to view this post
VIEW IN TELEGRAM
π7β€2π₯1
CHALLENGE
function trickyFunction() {
let a = 5;
let b = '5';
let c = 5;
if (a == b && b === c) {
console.log('Condition 1');
} else if (a === c || b == c) {
console.log('Condition 2');
} else {
console.log('Condition 3');
}
}
trickyFunction();
π6π₯2
π27π€£16β€4π€4π₯1
π Play Tetris in a PDF File
I'll let you decide if this one is fun or frightening! Whether or not this will work depends on your PDF reader or browser support, but it works with Chrome and Firefox, at least.
The PDF document format supports embedded JavaScript and this experiment uses it to implement a game of Tetris. The developer, Thomas Rinsma, has used Python to output the PostScript that includes the game's JavaScript. Couple that with the fact many browser PDF renderers are themselves implemented in JavaScript (e.g. PDF.js) and you have a veritable Matryoshka doll of technologies at play here.
I'll let you decide if this one is fun or frightening! Whether or not this will work depends on your PDF reader or browser support, but it works with Chrome and Firefox, at least.
The PDF document format supports embedded JavaScript and this experiment uses it to implement a game of Tetris. The developer, Thomas Rinsma, has used Python to output the PostScript that includes the game's JavaScript. Couple that with the fact many browser PDF renderers are themselves implemented in JavaScript (e.g. PDF.js) and you have a veritable Matryoshka doll of technologies at play here.
π€£11π6β€2π€2
CHALLENGE
function displayArguments() {
console.log(arguments.length);
console.log(arguments[0]);
console.log(arguments[2]);
}
displayArguments('Hello', 'World', 'JavaScript', 'Quiz');
π€8π€£7β€3π3π₯2
What is the output?
Anonymous Quiz
12%
3 Hello undefined
6%
4 World Quiz
77%
4 Hello JavaScript
4%
4 Hello Quiz
π€£23π20β€6
The polished demos show a lot of effort has been put in here. GitHub repo.
Yair Even-Or
Please open Telegram to view this post
VIEW IN TELEGRAM
β€4π3π₯2π€1
CHALLENGE
let str = "Hello, World!";
let result = str.substring(7, 12);
console.log(result);
π6
π22π₯8π€5π€£4β€2
βοΈ The 'WinterCG' Web Interoperable Runtimes Community Group, an effort to promote standards around runtime interoperability of JavaScript runtimes, has moved to Ecma International and is now known as WinterTC (TC55).
β€4π2π₯2
CHALLENGE
const a = '10';
const b = 20;
const c = '30.5';
const result = Number(a) + b + Number.parseFloat(c);
console.log(result);
π4β€2
π24π€£14π₯7π€5β€1
2024 saw the still-extremely-popular Express project awaken from a slumber, of sorts, with work being made to update things to modern standards, a security audit, and the release of Express v5. Here, the team explains whatβs been going on behind the scenes to get Express back on the tracks, as well as a βbold vision for 2025.β
Express Technical Committee
Please open Telegram to view this post
VIEW IN TELEGRAM
β€11π4π₯2
CHALLENGE
function multiply(a, b = a * 2) {
return a * b;
}
console.log(multiply(3));
π10π₯4
π13π€12β€5π₯2π€£1
More accurately, itβs a set of Node bindings for a Rust-powered non-browser implementation of the Web Audio API.
IRCAM β Centre Pompidou
Please open Telegram to view this post
VIEW IN TELEGRAM
β€5π₯4π3
CHALLENGE
class Vehicle {
static type() {
return "Generic Vehicle";
}
}
class Car extends Vehicle {
static type() {
return "Car";
}
}
console.log(Car.type());
π11