Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/cli/mod.ts>promptSecret

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function promptSecret
import { promptSecret } from "https://deno.land/std@0.220.1/cli/mod.ts";

Shows the given message and waits for the user's input. Returns the user's input as string. This is similar to prompt() but it print user's input as * to prevent password from being shown. Use an empty mask if you don't want to show any character.

Parameters

optional
message = [UNSUPPORTED]
optional
unnamed 1: PromptSecretOptions = [UNSUPPORTED]

Returns

string | null