There Are a Lot of Ways to Break Up Long Tasks in JavaScript — Due to how browsers and the event loop work, letting a single task hog the main thread is a quick way to freeze up your site’s UI. Alex explains the problem and uses a simple example to walk through the pros and cons of different solutions from basic use of setTimeout() to requestAnimationFrame() , channel messaging, and Web Workers.
Alex MacArthur
|
How to Publish ESM-Based npm Packages with TypeScript — Now that you can use the ES modules (almost) everywhere, it’s worth understanding how to package them up for use with npm. Axel digs into everything you need to know and shares some useful tools too.
Dr. Axel Rauschmayer
|
Vite with TypeScript — If you’ve created a JavaScript-based React project with Vite and want to get on the TypeScript train, here are the basic steps.
Robin Wieruch
|
RE2JS 1.0: Linear Time Matching for Regular Expressions — RE2 is a regular expression engine built by Google designed to operate in time proportional to the size of the input, in order to avoid so-called ‘ReDoS’ problems caused by backtracking, and this brings such protection to the browser too.
Oleksii Vasyliev
|
-
🍪 CookieConsent 3.1 – A lightweight, pure JS, GDPR-compliant cookie consent mechanism with which to annoy all your users meet regulatory requirements.
-
Happy DOM 17.0 – Cross-runtime JS implementation of a web browser sans UI. Now supports ES modules.
-
remove-unused-vars 0.0.4 – An experimental new tool for removing unused variables from code.
-
get-value 4.0 – Use property paths (a.b.c ) get a nested value from an object.
-
mp4-muxer 5.2 – MP4 multiplexer in pure TypeScript with support for the WebCodecs API, video and audio.
-
🗺️ react-map-gl 8.0 – React friendly API wrapper around MapboxGL JS. (Demo.)
-
🗓️ Schedule-X 2.17 – Material Design event calendar and date picker.
-
Wasp 0.16 – Wasp is a Rails-like framework using Node, React & Prisma.
-
web-worker 1.5 – Consistent Web Workers in browser and Node.
-
Js_of_ocaml (jsoo) 6.0 – An OCaml to JavaScript compiler.
-
RxDB 16.5 – Offline-first, reactive database for JS apps.
|
🎵 A quick musical number..
|
A Protracker Module Player in Pure JavaScript — I’m a sucker for 90s tracker music, JavaScript experiments, and cool Web experiences, and this has all three. If you’re not familiar with tracker music, it’s a way to write music on a grid which triggers the playing of samples. This code manages to parse and play a Protracker file in pure JavaScript. (Note: The image above is of the original Protracker app, this experiment is more minimal and about the code.)
srtuss
|
|