javascript

All my posts about javascript.

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Introducing Dinero.js

v2.dinerojs.com

Using Dinero, you can perform mutations, conversions, comparisons, format them extensively, and overall make money manipulation in your application easier and safer.

The docs also contain a few falsehoods many developers believe to be true about money.

Read more [v2.dinerojs.com]

Writable getters in JavaScript

lea.verou.me

A pattern that has come up a few times Vera's my code is the following: an object has a property which defaults to an expression based on its other properties unless it’s explicitly set, in which case it functions like a normal property. Essentially, the expression functions as a default value.

Read more [lea.verou.me]