News for hackers. Stuff that matters.
Re:Show HN: A JavaScript function that looks and behaves lik... by stby on Wednesday September 27, 2023 @06:14AM (#37672637)
I had a hard time reading the example until I applied the "normal" JS indentation, that would also likely be applied by Prettier and the likes.

  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
  )

It's certainly a nice usage of JavaScript's Proxy object and the resulting syntax is simple to grasp. Also glad to see the TS definitions in there. Well done!
Re:Show HN: A JavaScript function that looks and behaves lik... by FroLeMageBlanc on Wednesday September 27, 2023 @08:25AM (#37673612)
Author here. Thanks for your nice comment. I added a note to show the "normal" autoformatted syntax.