0.0.4 • Published 1 month ago

@funish/prompt v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@funish/prompt

npm version npm downloads npm license Contributor Covenant

Programmatically create interactive prompts based on Consola, powered by Funish.

Getting started

# npm
$ npm install @funish/prompt

# yarn
$ yarn add @funish/prompt

# pnpm
$ pnpm add @funish/prompt

Usage

Single prompt

import { usePrompt } from "@funish/prompt";

const name = await usePrompt("What is your name?", { type: "text" });

console.log(name);

Multiple prompts

import { createPrompt } from "@funish/prompt";

const prompt = await createPrompt({
  name: {
    type: "text",
  },
  private: {
    type: "confirm",
  },
  keywords: {
    type: "multiselect",
    options: ["a", "b", "c"],
  },
});

console.log(prompt);

// { name: "funish", private: true, keywords: ["a", "b"] }

Interfaces

See it on JSDoc.

License

0.0.4-edge.3

1 month ago

0.0.4-edge.2

1 month ago

0.0.4

1 month ago

0.0.4-edge.1

2 months ago

0.0.4-edge.0

11 months ago

0.0.3

1 year ago

0.0.3-edge.2

1 year ago

0.0.3-edge.1

1 year ago

0.0.3-edge.0

1 year ago

0.0.2

1 year ago

0.0.2-edge.0

1 year ago

0.0.1

1 year ago

0.0.1-edge.3

1 year ago

0.0.1-edge.2

1 year ago

0.0.1-edge.1

1 year ago

0.0.1-edge.0

1 year ago

0.0.0

1 year ago