In a recent project, I worked with Markdown files that contained metadata at the top for blog posts. I needed to parse the Markdown with …
Javascript
Waiting for an Element to Exist With JavaScript
There are many different ways to solve this use case. You want to wait for an element to exist on the page and run a callback function when …
How to Extend the Window Object in TypeScript
In many cases when you're working with TypeScript, there are type definitions available for almost every package out there. However, in …
How To Test Your Web Applications Using Playwright and Support 2fa Tokens
At work, I've been migrating us over from Cypress to Playwright for end-to-end tests. In that time, we've enabled two-factor authentication …
How to Use Bootstrap JavaScript Components Inside of Shadow DOM Web Components
Despite doing this front-end thing for over a decade, I still encounter new problems thanks to the ever-evolving web specifications. One of …
Thoughts on Bun
Say what you will, but since its introduction in 2009, Node.js has been the undisputed king of server-side Javascript. Created by Ryan Dahl, …
Deno Raises $21M – but is anyone using it yet?
After raising a $4,900,000 seed investment back in March 2021, Deno has just announced quite a substantial round of Series A investment of …
How to Sort an Array of Object Values Alphabetically and Numerically
While sorting an array of objects recently, I needed to sort by an identifier prefixed with two letters and ended with numbers. An example …
How to Remove Duplicate Items From an Array in JavaScript (the Easy Way)
Languages such as PHP have methods for de-duplicating arrays, but Javascript strangely does not. In PHP, you can write. array_uniqueAnd this …