Comment

Comment by stestagg

you can replace with this:

    function shorten(text, length) {
      return new Promise((a, r) =>
      fetch(`http://leftpad.io/shorten?l=${length}&v=${encodeURIComponent(text)}`).then(rx=>rx.text().then(a, r), r));
    }
parent stestagg 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton