-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to disable property name logging in prompt #211
Comments
Can you post some code so I can reproduce your error? |
its not a error, I want to know how to disable the "prompt" string that is printed by the module with the prompt name whenever you prompt.get() |
looking at the source, you can probably override it with |
I tried that, doesn't work |
can you show some code? it works just fine for me, e.g.: const prompt = require('prompt');
prompt.message = '';
const { code } = await prompt.get({
properties: {
code: {
type: 'string',
required: true,
},
}
}); outputs:
|
Oh, how to remove the "code: " message |
That doesn't sound like a good idea to remove any prefix, in terms of UX, but you could probably go with const prompt=require('prompt');
prompt.message='';
prompt.delimiter='';
const data = await prompt.get(' '); // or prompt.get('\u200B'); because empty string seems to complain just try out what works for you, I don't know much more about prompt than you, I just read the docs and the small source code to answer you |
How do I disable the property name, this explain https://stackoverflow.com/questions/41901072/node-js-prompt-how-to-disable-the-appearance-of-the-property-name#comment70985144_41901266
The text was updated successfully, but these errors were encountered: