Overview for 'evertpot'
Written by Evert Pot
/ Original link
on Feb. 18, 2020
Say, you’re in a situation where you have a user type, that looks a bit as follows: export type User = { firtName: string; lastName: string; email: string; } function save(user: User) { // ... } const user = { firstName: 'Evert', lastName: 'Pot', email: 'foo@example.org', } save(user); But, instead…
Written by Evert Pot
/ Original link
on Feb. 11, 2020
By default browsers will render links blue, and links that have been visited purple. This quality of life feature goes back as far as I can remember, a casual search tells me the feature existed in Mosaic. I kinda love blue links. They’re so recognizable as links. But with CSS, many people change…
Written by Evert Pot
/ Original link
on Jan. 2, 2020
When building web services, a common wisdom is to try to reduce the number of HTTP requests to improve performance. There are a variety of benefits to this, including less total bytes being sent, but the predominant reason is that traditionally browsers will only make 6 HTTP requests in parallel fo…
Written by Evert Pot
/ Original link
on Nov. 29, 2019
Links are critical when writing good REST APIs. Most APIs these days use JSON for their main format. Unfortunately, there’s no universally agreed on way to encode a link in JSON. REST can really benefit from generic tooling. To write a generic tool that consumes links, it means that these tools mig…
Written by Evert Pot
/ Original link
on Nov. 22, 2019
I just released Ketting version 5. Ketting is a generic hypermedia/HATEOAS client for Javascript and Typescript, for browsers and Node.js. It’s been a while since I last blogged about this in January, so I thought it might be nice to talk about all the things that have changed since then. These are…
Written by Evert Pot
/ Original link
on Oct. 28, 2019
Most of the Javascript code I write heavily depends on promises and async/await. One of the issues I ran into, is that I would like to offer users of my library a fluent interface, but do so with async/await. To give an example, consider the following function: async function getArticles() { const…