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

enquirer-prompt-editor

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enquirer-prompt-editor

Opens your text editor and waits for you to save your input during a prompt.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
87
increased by234.62%
Maintainers
1
Weekly downloads
 
Created
Source

enquirer-prompt-editor

Prompt for enquirer that opens your preferred text editor ($VISUAL or $EDITOR) and waits for you to save your input during a prompt.

Install

$ yarn add enquirer-prompt-editor

Usage

const Enquirer = require('enquirer');
const enquirer = new Enquirer();

enquirer.register('editor', require('enquirer-prompt-editor'));
enquirer
  .prompt({
    type: 'editor',
    name: 'bio',
    message: 'Please write a short bio of at least 3 lines.',
    validate: text => {
      if (text.split('\n').length < 2) {
        return 'Must be at least 3 lines.';
      }
      return true;
    },
  })
  .then(answers => console.log(answers));

Keywords

FAQs

Package last updated on 20 Dec 2018

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