element.version === currentVersion)) { versionNodes.unshift({ version: currentVersion, url: "#" }); } document.querySelector("#project-version").innerHTML = versionNodes.reduce( (acc, element) => { const status = currentVersion === element.version ? "selected disabled" : ""; return ` ${acc} `; }, `
question · v1.0.0

question

Package Version Hex Docs

Simple wrapper function to grab user input in a CLI tool. It prints a prompt to stdout, waits and returns the user answer in a callback. Provides bindings for erlang and javascript.

Installation

gleam add question

Example

import question.{question}

pub fn main() {
 question("The original prompt engineering?\n", fn (answer) {
   io.println("Answer: " <> answer)
 })
}

Further documentation can be found at https://hexdocs.pm/question.

Search Document