1.0.1 • Published 2 years ago

prompt-path v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

prompt-path

build: passing test: 1.0.0

When you need to prompt a path in your CLI app.

Usage

const { promptPath } = require("prompt-path");

promptPath().then((path) => {
    console.log(path);
});

Params (optional)

const path = await promptPath({
    basePath: "~",
    prefix: "file: ",
    target: PromptPathTarget.File,
});
  • basePath Initial path (current directory by default).
  • prefix The prompt string to use ('> ' by default).
  • target File or directory (both by default).