UNPKG

mathjs

Version:

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif

19 lines (14 loc) 432 B
'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;