Javascript

  1. Displaying durations is quite annoying because formatting functions often require a duration object, splitting out durations components. I’m not sure why this isn’t part of the standard library, but it doesn’t seem to be.

  2. Use .flatMap() for a more efficient and more type safe array filter then map.

  3. Something I have to do rarely, but just often enough so I have to figure it out or look it up again each time is adding ordinal suffixes to numbers so 1 becomes 1st, 2 becomes 2nd, etc. It’s annoying.

  4. Rounding to the nearest number in javascript (or typescript) is so simple yet I still have to look it up occasionally. I wrote this so hopefully I don’t have to think about it again.

  5. Svelte components can expose parts of their internal state to parent components in a variety of ways. Here are some notes about the options and tradeoffs.

  6. How to use flatgeobuf files to do reverse geocoding without any server side processing.