CrazySynthax
CrazySynthax

Reputation: 15008

node.js prompt: how to diable the appearance of the word 'prompt'?

I use npm package 'prompt' - https://www.npmjs.com/package/prompt. What I dislike in this package is that whenever the code waits for a user input it prints the word 'prompt:' in console.

For example, the code:

 var prompt = require('prompt');
  prompt.start();
  prompt.get(['username', 'email'], function (err, result) {
    console.log('Command-line input received:');
    console.log('  username: ' + result.username);
    console.log('  email: ' + result.email);
  });

will print to console:

prompt: username: some-user
prompt: email: [email protected]

Command-line input received: username: some-user email: [email protected]

I don't want to see the word 'prompt' whenever the console wait for user input. Do you know how it can be disabled?

Upvotes: 1

Views: 157

Answers (1)

erbridge
erbridge

Reputation: 1386

As stated in the docs, you simply set prompt.message and prompt.delimiter.

Upvotes: 1

Related Questions