Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-qa

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-qa

Command-line Questions & Answers

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

cli-qa

Command-line Questions & Answers. Supports color formatting, lists, yes/no confirmations.

Install

$ npm install cli-qa

Usage

var QA = require('cli-qa')

var questions = [
  { key: "name", title: "Hey! What's your name?" },
  { key: "foods", title: "What are your 3 most favorite foods?", list: 3 },
  { title: "Favorite books?", description: "Type as much as you want!", list: true }, // unlimited list input
  "Thoughts?",
  { title: "That's all?", description: "Yes/No", bool: true }
];

QA(questions, function (answers) {
  console.log(answers)
  // => {
  //      "name": "Azer",
  //      "foods": ["falafel", "babi guling", "kebab"],
  //      "favoriteBooks": ["snow", "white castle"],
  //      "thoughts": "let's go somewhere!",
  //      "thatsAll": true
  //    }
})

Styling

Title and description fields can be styled with style-format interface. Here is an example;

QA([{ title: "{green}Yes{reset}/{red}No{reset}?", bool: true }], function (answers) {
  answers[yesNo]
  // => true or false
})

Keywords

FAQs

Package last updated on 28 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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