BigFont Blog
  • Home
  • About
  • Bibliography (Work)

regex

A collection of 1 post

Use a regular expression in VS Code's find/replace to replace && with JavaScript's optional chaining
vscode

Use a regular expression in VS Code's find/replace to replace && with JavaScript's optional chaining

In December 2019, optional chaining went to TC39 stage 4. Here is a regular expression to replace most instances of foo && foo.bar and baz && baz() with optional chaining.

  • Shaun Luttin
    Shaun Luttin
1 min read
BigFont Blog © 2021
Latest Posts Ghost