David Walsh

Match Accented Letters with Regular Expressions

Regular expressions are used for a variety of tasks but the one I see most often is input validation. Names, dates, numbers…we tend to use regular expressions for everything, even when we probably shouldn’t. The most common syntax for checking alphabetic characters is A-z but what if the string contains accented characters? Characters like ğ […]

The post Match Accented Letters with Regular Expressions appeared first on David Walsh Blog.

Promise.allSettled

The Promise object has many useful functions like all, resolve, reject, and race — stuff we use all the time. One function that many don’t know about is Promise.allSettled, a function that fires when all promises in an array are settled, regardless of whether any of the promises are resolved or rejected. Promise.all is great […]

The post Promise.allSettled appeared first on David Walsh Blog.

Binding Arguments with Bind

One of my favorite and most essential Function method is bind, a function we added to MooTools when it wasn’t featured in the JavaScript language itself. We often think of using bind to simply bind a method’s call to its host object, but did you know you can also bind arguments with the host object? […]

The post Binding Arguments with Bind appeared first on David Walsh Blog.

Tips for Starting with Bitcoin and Cryptocurrencies

One of the most rewarding experiences of my life, both financially and logically, has been buying and managing cryptocurrencies like Bitcoin, Litecoin, Ethereum. Like learning any other new tech, I made rookie mistakes along the way, but learned some best practices along the way. Check out these tips for starting with cryptocurrencies! You Don’t Need […]

The post Tips for Starting with Bitcoin and Cryptocurrencies appeared first on David Walsh Blog.

Lazy Load IFRAMEs

We’ve known for a decade that lazy loading resources like JavaScript, CSS, and especially images is a massive performance win for web pages. At first we used tricks and JavaScript to do the lazy loading, but more recently native image lazy loading has debuted in browsers. Did you know that you can also lazy load […]

The post Lazy Load IFRAMEs appeared first on David Walsh Blog.