.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / enquirer / lib / prompts / password.js
1 'use strict';
2
3 const StringPrompt = require('../types/string');
4
5 class PasswordPrompt extends StringPrompt {
6   constructor(options) {
7     super(options);
8     this.cursorShow();
9   }
10
11   format(input = this.input) {
12     if (!this.keypressed) return '';
13     let color = this.state.submitted ? this.styles.primary : this.styles.muted;
14     return color(this.symbols.asterisk.repeat(input.length));
15   }
16 }
17
18 module.exports = PasswordPrompt;