2024-05

ECMAScript proposal: duplicate named capturing groups for regular expressions

[2024-05-16] dev, javascript, es proposal

In this blog post, we take a look at the ECMAScript 2025 feature “Duplicate named capturing groups” which was proposed by Kevin Gibbons.

It’s a feature for regular expressions that enables us to use the same capture group name more than once. The only restriction is that duplicates must exist in different alternatives – in other words: At any time, there can’t be more than one capture with a given name.

Why is that useful? It lets us reuse regular expression fragments and match-processing code between alternatives.

ECMAScript proposal: Promise.withResolvers()

[2024-05-14] dev, javascript, es proposal, async, promises

In this blog post we take a look at the ECMAScript 2024 feature Promise.withResolvers (proposed by Peter Klecha). It provides a new way of directly creating Promises, as an alternative to new Promise(...).

2022-12

ECMAScript proposal: Set methods

[2022-12-14] dev, javascript, es proposal

In this blog post, we examine the ECMAScript proposal “Set methods for JavaScript” by Michał Wadas, Sathya Gunasekara and Kevin Gibbons. It introduces new methods for Sets.

ECMAScript proposal: iterator helpers

[2022-12-09] dev, javascript, es proposal

In this blog post, we look at the ECMAScript proposal “Iterator helpers” by Gus Caplan, Michael Ficarra, Adam Vandolder, Jason Orendorff, Kevin Gibbons, and Yulia Startsev. It introduces utility methods for working with iterable data: .map(), .filter(), .take(), etc.

The style of the proposed API clashes with the style of the current iteration API. We’ll explore how we can fix that.

2022-11

Testing static types in TypeScript

[2022-11-28] dev, typescript

When it comes to TypeScript code:

  • There are many options for testing its behavior at runtime.
  • There are far fewer options for testing its compile-type types.

In this blog post, we look at the latter.

ECMAScript proposal: Array.fromAsync()

[2022-11-27] dev, javascript, es proposal

This blog post is about the ECMAScript proposal “Array.fromAsync for JavaScript” by J. S. Choi. It introduces a static method for converting asynchronous iterables to Arrays.

ECMAScript proposal: source text access for JSON.parse() and JSON.stringify()

[2022-11-18] dev, javascript, es proposal

In this blog post, we look at the ECMAScript proposal “JSON.parse source text access” by Richard Gibson and Mathias Bynens.

It gives access to source text to two kinds of callbacks:

  • Revivers, callbacks that are passed to JSON.parse() and post-process the data it parses.
  • Replacers, callbacks that are passed to JSON.stringify() and pre-process data before it is stringified.

We’ll examine how exactly that works and what you can do with this feature.

ECMAScript proposal: RegExp flag /v makes character classes and character class escapes more powerful

[2022-11-15] dev, javascript, es proposal

In this blog post, we look at the ECMAScript proposal “RegExp v flag with set notation + properties of strings” by Markus Scherer and Mathias Bynens.

Linking from GitHub to Mastodon

[2022-11-13] computers, decentralized, mastodon, github

Finding people on Mastodon is still difficult. If you have a GitHub account, you can help others find you by linking from it to your Mastodon account.

2022-10

Getting started with Mastodon

[2022-10-28] computers, decentralized, mastodon

I use both Twitter and Mastodon and like both. Both have pros and cons.

In this blog post, I’d like to explain how to get started with Mastodon.