import { Secret } from "https://deno.land/x/cliffy@v1.0.0-rc.4/prompt/secret.ts";
Secret prompt representation.
import { Secret } from "./mod.ts";
const password: string = await Secret.prompt("Enter your password");
Constructors
new
Secret(options: string | SecretOptions)Methods
protected
input(): stringgetDefaultSettings(options: SecretOptions): SecretSettings
Static Methods
inject(value: string): void
Inject prompt value. If called, the prompt doesn't prompt for an input and returns immediately the injected value. Can be used for unit tests or pre selections.
prompt(options: string | SecretOptions): Promise<string>
Execute the prompt with provided message or options.