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)); }
$ host leftpad.io Host leftpad.io not found: 3(NXDOMAIN)