I had to implement some testing logic recently where I wanted to wait for a heavy page to load and for specific elements to become …
Javascript
How To Handle Async/Await Errors in Javascript
Some developers are still new to async/await in Javascript. If you're used to callbacks or using .then to get the value of a promise, …
Recursively Fetch Data From The GitHub API Using Octokit
Recently I began updating TidyFork to be written in Aurelia 2. As such, I took the opportunity to change how the repositories were loaded in …
How To Calculate A Javascript Date X Months Ago With Vanilla Javascript
Working with dates in 2020 are still a mess. Presumably, they'll also be a mess to work within 2021, 2022 and for a good while after that. …
How To Convert An Object To An Array In Vanilla Javascript
I do quite a lot of work with Firebase and when you are working with authentication claims, they will be returned as an object containing …
How To Add Feature Flags Into Your Javascript Applications
Feature flags are a great way to prevent stale branches by regularly shipping features in your code without officially enabling them. A …
How To Get Last 4 Digits of A Credit Card Number in Javascript
Recently whilst working on my Aurelia 2 book, for the example application where you checkout I needed to add in the ability to provide a …
I Used To Hate Using Reduce In Javascript, And Now I Can’t Stop
I used to be vehemently against using `reduce` in Javascript. It wasn't because I thought there was a better way, I actually think the …
How To Develop A Seedable Dice Roll/Number Guess In JavaScript
Recently whilst working on some blockchain specific code, I needed to write a random number generator to simulate generating a range of …