Comment

Comment by ranting-moth

>The following example code is a bit hard to read:

  >const { status } = await send(capitalize(greeting) + "!")
  >console.log(status)
No it's not hard to read.

  >Make it less nested, more vertical, by using the V "pipe":
  >V( greeting,     // initial value  "hi"
  >V (capitalize),  // custom function call  "Hi"
  >V .concat("!"),  // String method `concat` call  "Hi!"
  >V (send),        // custom async function call  Promise { <pending> }
  >V .status,       // automatic promise chaining + getting property  Promise {200}
  >V (console.log), // automatic promise chaining + global function call  logs 200 )
This cursed abomination is a joke isn't it?

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton