The Deno team recently shipped Deno by example:
Deno by example is a collection of annotated examples for how to use Deno, and the various features it provides.
It’s a pretty neat little reference.
I browsed through each of the examples and one thing I noticed, which I’ve blogged about before, is how “webby” Deno is. Meaning, its APIs are (as much as possible) the web platform JavaScript APIs.
For example, look at the recommendations for doing input prompts: it’s the alert
, confirm
, and prompt
JavaScript APIs. No new APIs, just the ones you know and love.
In other words: are you building a CLI tool and need to capture some input from the user? No need to find, vet, install, and learn some third-party input library. Use what you know.
const name = prompt("Please enter your name:");
console.log("Name:", name);
Continuing on the theme