On 22 June 2022, the 123nd Ecma General Assembly approved the ECMAScript 2022 language specification, which means that it’s officially a standard now.
This blog post explains what’s new.
There are two ways in which npm packages can be installed:
Locally, into a
node_modules directory that npm searches for (or creates) in the current directory and its ancestors:
npm install some-package
Globally, into a global
npm install --global some-package
(Instead of the long version
--global of this flag, we can also use the shorter
The latter requires root access on macOS and some other Unix platforms – which is a considerable downside. That’s why this blog post explores alternatives to global installs.
Web streams are a standard for streams that is now supported on all major web platforms: web browsers, Node.js, and Deno. (Streams are an abstraction for reading and writing data sequentially in small pieces from all kinds of sources – files, data hosted on servers, etc.)
For example, the global function
fetch() (which downloads online resources) asynchronously returns a Response which has a property
.body with a web stream.
This blog post covers web streams on Node.js, but most of what we learn applies to all web platforms that support them.
UTM is a free virtualization software that runs Windows/ARM on Apple Silicon Macs. This blog post explains how to use it.
In this blog post, we look at three ways of processing Arrays:
The goal is to help you choose between these features whenever you need to process Arrays. In case you don’t know
.flatMap() yet, they will both be explained to you.
In order to get a better feeling for how these three features work, we use each of them to implement the following functionality:
Everything we do is non-destructive: The input Array is never changed. If the output is an Array, it is always freshly created.
(This blog post is based on a tweet thread and additional input by Mathias Bynens.)
...) – is used for two different mechanisms:
This blog post examines how these mechanisms work and why they are not operators.
This blog post describes the ECMAScript proposal “Change Array by copy” by Robin Ricard and Ashley Claymore. It proposes four new methods for Arrays and Typed Arrays:
This blog post describes the ECMAScript proposal “ShadowRealm API” by Dave Herman, Caridy Patiño, Mark S. Miller, Leo Balter, and Rick Waldron.
ShadowRealm provides a new way of evaluating code at runtime – think
eval() but better:
This blog post describes the ECMAScript proposal “Array find from last” by Wenlu Wang and Daniel Rosenwasser.