Socket
Socket
Sign inDemoInstall

@inquirer/select

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inquirer/select - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

dist/cjs/index.mjs

6

package.json
{
"name": "@inquirer/select",
"version": "1.0.3",
"version": "1.1.0",
"description": "Inquirer select/list prompt",

@@ -57,3 +57,3 @@ "main": "./dist/cjs/index.js",

"dependencies": {
"@inquirer/core": "^1.0.4",
"@inquirer/core": "^1.1.0",
"@inquirer/type": "^1.0.3",

@@ -89,3 +89,3 @@ "ansi-escapes": "^4.3.2",

},
"gitHead": "12fecef5292da253564c845ef5be67b37441e381"
"gitHead": "09f738e0ab2b52c0b33a3973f37d5256bca9a6ab"
}

@@ -18,3 +18,3 @@ # `@inquirer/select`

```js
import select from '@inquirer/select';
import select, { Separator } from '@inquirer/select';

@@ -34,2 +34,3 @@ const answer = await select({

},
new Separator(),
{

@@ -51,8 +52,10 @@ name: 'jspm',

| Property | Type | Required | Description |
| -------- | --------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| message | `string` | yes | The question to ask |
| choices | `Array<{ value: string, name?: string, description?: string, disabled?: boolean \| string }>` | yes | List of the available choices. The `value` will be returned as the answer, and used as display if no `name` is defined. Choices who're `disabled` will be displayed, but not selectable. The `description` will be displayed under the prompt when the cursor land over the choice. |
| pageSize | `number` | no | By default, lists of choice longer than 7 will be paginated. Use this option to control how many choices will appear on the screen at once. |
| Property | Type | Required | Description |
| -------- | ---------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| message | `string` | yes | The question to ask |
| choices | `Array<{ value: string, name?: string, description?: string, disabled?: boolean \| string } \| Separator>` | yes | List of the available choices. The `value` will be returned as the answer, and used as display if no `name` is defined. Choices who're `disabled` will be displayed, but not selectable. The `description` will be displayed under the prompt when the cursor land over the choice. |
| pageSize | `number` | no | By default, lists of choice longer than 7 will be paginated. Use this option to control how many choices will appear on the screen at once. |
The `Separator` object can be used to render non-selectable lines in the choice list. By default it'll render a line, but you can provide the text as argument (`new Separator('-- Dependencies --')`). This option is often used to add labels to groups within long list of options.
# License

@@ -59,0 +62,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc