{"id":13531541,"url":"https://github.com/adam-golab/inquirer-select-line","last_synced_at":"2025-04-01T19:32:17.419Z","repository":{"id":47964884,"uuid":"91189803","full_name":"adam-golab/inquirer-select-line","owner":"adam-golab","description":"Prompt for inquirer for inserting into array","archived":false,"fork":false,"pushed_at":"2022-12-04T14:13:34.000Z","size":183,"stargazers_count":13,"open_issues_count":9,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T06:35:50.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adam-golab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-13T17:03:28.000Z","updated_at":"2025-01-23T07:25:03.000Z","dependencies_parsed_at":"2023-01-23T01:01:12.724Z","dependency_job_id":null,"html_url":"https://github.com/adam-golab/inquirer-select-line","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam-golab%2Finquirer-select-line","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam-golab%2Finquirer-select-line/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam-golab%2Finquirer-select-line/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam-golab%2Finquirer-select-line/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adam-golab","download_url":"https://codeload.github.com/adam-golab/inquirer-select-line/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246700647,"owners_count":20819910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:01:03.823Z","updated_at":"2025-04-01T19:32:12.860Z","avatar_url":"https://github.com/adam-golab.png","language":"JavaScript","funding_links":[],"categories":["Inquirer Prompts"],"sub_categories":[],"readme":"# inquirer-select-line\n\nselect-line prompt for [inquirer](https://github.com/SBoudrias/Inquirer.js)\n\n![demo](https://media.giphy.com/media/xUA7b1MxpngddUvdHW/giphy.gif)\n\n## Installation\n\n```\nnpm install --save inquirer-select-line\n```\n\n## Usage\n\n### Register the prompt\n\n```javascript\ninquirer.registerPrompt('selectLine', require('inquirer-select-line'));\n\ninquirer.prompt({\n  type: 'selectLine',\n  message: message,\n  name: name,\n  choices: choices,\n  placeholder: placeholder,\n})\n```\n\nChange `selectLine` to whatever you might prefer.\n\n### Options\n-**message** : (*String*|*Function*) The question to print. If defined as a function, the first parameter will be the current inquirer session answers.\n\n-**name** : (*String*) The name to use when storing the answer in the answers hash. If the name contains periods, it will define a path in the answers hash.\n\n-**choices**: (*Array*|*Function*) Choices array or a function returning a choices array. If defined as a function, the first parameter will be the current inquirer session answers. Array values have to be simple strings. The choices array can also contain [a Separator](https://github.com/SBoudrias/Inquirer.js/#separator).\n\n-**placeholder** (*String*|*Function*) The name to display as a placeholder for chosen line. If defined as a function, the first parameter will be index of currently chosen answer. (optional) default: `INSERT HERE`.\n\n#### Example\n\n```javascript\ninquirer.registerPrompt('selectLine', require('inquirer-selectLine'));\ninquirer.prompt([{\n  type: 'selectLine',\n  message: 'Where add line?',\n  name: 'line',\n  choices: ['first', 'second', 'third', 'fourth'],\n}]).then(function(answers) {\n    console.log('Chosen line: ' answers.line);\n    /*\n    OUTPUT :\n    Chosen line: 2\n    */\n});\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-golab%2Finquirer-select-line","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam-golab%2Finquirer-select-line","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-golab%2Finquirer-select-line/lists"}