How to use the sisteransi.erase.lines function in sisteransi

To help you get started, we’ve selected a few sisteransi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flaviuse / mern-authentication / client / node_modules / prompts / lib / elements / toggle.js View on Github external
render() {
    if (this.closed) return;
    if (this.firstRender) this.out.write(cursor.hide);
    super.render();

    this.out.write(
      erase.lines(this.first ? 1 : this.msg.split(/\n/g).length) +
      cursor.to(0) + [
        style.symbol(this.done, this.aborted),
        color.bold(this.msg),
        style.delimiter(this.done),
        this.value ? this.inactive : color.cyan().underline(this.inactive),
        color.gray('/'),
        this.value ? color.cyan().underline(this.active) : this.active
      ].join(' ')
    );
  }
}