5.0.1 • Published 8 months ago

@inquirer/confirm v5.0.1

Weekly downloads
681
License
MIT
Repository
github
Last release
8 months ago

@inquirer/confirm

Simple interactive command line prompt to gather boolean input from users.

Confirm prompt

Installation

npm install @inquirer/confirm

yarn add @inquirer/confirm

Usage

import confirm from '@inquirer/confirm';

const answer = await confirm({ message: 'Continue?' });

Options

PropertyTypeRequiredDescription
messagestringyesThe question to ask
defaultbooleannoDefault answer (true or false)
transformer(boolean) => stringnoTransform the prompt printed message to a custom string
themeSee ThemingnoCustomize look of the prompt.

Theming

You can theme a prompt by passing a theme object option. The theme object only need to includes the keys you wish to modify, we'll fallback on the defaults for the rest.

type Theme = {
  prefix: string;
  spinner: {
    interval: number;
    frames: string[];
  };
  style: {
    answer: (text: string) => string;
    message: (text: string) => string;
    defaultAnswer: (text: string) => string;
  };
};

License

Copyright (c) 2023 Simon Boudrias (twitter: @vaxilart) Licensed under the MIT license.

@novomanu/project-cli@infinitebrahmanuniverse/nolb-_inqproject-turbo-init@everything-registry/sub-chunk-464create-aztec-appwzyk-clixeno-clistart-envssupostool@dotenvx/dotenvx-ext-hub@coatl/gitter@calamansi/craftbot@booper/cli@ruijingrs/swagger-exporter@runespoorstack/changelog-managerjest-it-up-tslast-parse@exalif/inquirer-prompt-builderremegencreate-aztecspydsrt2fcpxmlumptitanotui-7z-archive-managertui-retroarch-thumbnail-downloader@altronix/cli@angular/build@atiqsarwar/number_guessing_game@atiqsarwar/simple_command_line_calculator@basis-theory-labs/cli@based/cli@cartesi/cli@chainlink/hardhat-chainlink@142vip/common@142vip/utils@4s1/conventional-commit-creator@actcoding/supa-cli@hoevelmanns/vcli@codemask-labs/argo-composer@codemaskinc/argo-composer@boykaframework/boyka-cli@deepstructure/cliyt2altzoucli@ecl-server/create-site@guanghechen/tool-mini-copy@guimaraes.mahota/agnus-cli@hlink/core@icebreakers/monorepo@flowshot/cli@frontendfyi/cli@garethnunns/cli-content-tracker@inkohx/setup-eslint@inquirer/prompts@kovsu/jutsu@makepad/create-web-component@massimo-cassandro/dev-utilities@martinhrvn/jest-it-up@fabyosk/lesslocal@mermaidchart/cli@mmxiong/cs-i18n@mockoon/cli@josee9988/implode-css@salesforce/plugin-dev@salesforce/sf-plugins-core@salesforce/plugin-sobject@openfn/logger@pnp/cli-microsoft365@novomanu/create-project-cli@orgware/ow-cli@owfdr/cook@resultify/hubspot-cms-lib@resultify/rh-climswmtn-installms-startmosuzi-climorphetmodern-skeleton-climonterey.jsmockprox-climicro-development-clin1-change-envn1-cli-toolsopenlgenpackage-version-bisectore-pper-clioclifsc4rocket-swaprocket-swap-jsbridgerocket-swap-swrvt-clirelease-nowregit-cliprisma-generator-buildernocsharpnew-pluto-appnexuscraft-cli
5.0.1

8 months ago

5.0.0

9 months ago

3.2.0

10 months ago

4.0.1

10 months ago

4.0.0

10 months ago

3.1.12

1 year ago

3.1.11

1 year ago

3.1.14

12 months ago

3.1.13

12 months ago

3.1.16

12 months ago

3.1.15

12 months ago

3.1.18

11 months ago

3.1.17

12 months ago

3.1.10

1 year ago

3.1.9

1 year ago

3.1.22

11 months ago

3.1.21

11 months ago

3.1.20

11 months ago

3.1.19

11 months ago

3.1.8

1 year ago

3.1.7

1 year ago

3.1.6

1 year ago

3.1.5

1 year ago

3.1.3

1 year ago

3.1.4

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.16

1 year ago

2.0.17

1 year ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.15

2 years ago

2.0.13

2 years ago

2.0.14

2 years ago

2.0.11

2 years ago

2.0.12

2 years ago

2.0.10

2 years ago

2.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.0

2 years ago

0.1.0

2 years ago

0.0.27-alpha.0

3 years ago

0.0.28-alpha.0

3 years ago

0.0.25-alpha.0

3 years ago

0.0.21-alpha.0

3 years ago

0.0.22-alpha.0

3 years ago

0.0.23-alpha.0

3 years ago

0.0.20-alpha.0

3 years ago

0.0.19-alpha.0

3 years ago

0.0.18-alpha.0

3 years ago

0.0.17-alpha.0

3 years ago

0.0.16-alpha.0

4 years ago

0.0.15-alpha.0

4 years ago

0.0.14-alpha.0

4 years ago

0.0.13-alpha.0

4 years ago

0.0.12-alpha.0

5 years ago

0.0.11-alpha.0

5 years ago

0.0.10-alpha.0

5 years ago

0.0.9-alpha.0

5 years ago

0.0.8-alpha.0

5 years ago

0.0.6-alpha.0

6 years ago

0.0.5-alpha.0

6 years ago

0.0.4-alpha.0

6 years ago