Comment

Comment by mnr

This is already a feature in Vanilla.js [1] in the "Parentheses" module.

Example:

  const lines = (await fetch(myUrl)).text().split('\n');
[1] http://vanilla-js.com/

Edit: magic-promises promotes all accessed properties to magic-promises as well, and performs magic on functions, so it's not exactly the same, but I'm not sure if I'd want to add the proxy overhead to my code just to make my code more "fluent".

parent mnr 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton