first commit
This commit is contained in:
18
app_vue/node_modules/enquirer/lib/prompts/password.js
generated
vendored
Normal file
18
app_vue/node_modules/enquirer/lib/prompts/password.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
const StringPrompt = require('../types/string');
|
||||
|
||||
class PasswordPrompt extends StringPrompt {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
this.cursorShow();
|
||||
}
|
||||
|
||||
format(input = this.input) {
|
||||
if (!this.keypressed) return '';
|
||||
let color = this.state.submitted ? this.styles.primary : this.styles.muted;
|
||||
return color(this.symbols.asterisk.repeat(input.length));
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = PasswordPrompt;
|
Reference in New Issue
Block a user