Last updated 2 years ago
You can change the font style of the header. The following options are available:
bold
italic
underline
uppercase
lowercase
upperfirst
Some font styles might not work on all terminals.
Change the header font style.
import { Table } from 'voici.js' const data = [ { firstname: 'Homer', lastname: 'Simpson', age: 39 }, { firstname: 'Marge', lastname: 'Simpson', age: 36 }, { firstname: 'Bart', lastname: 'Simpson', age: 10 }, { firstname: 'Lisa', lastname: 'Simpson', age: 8 }, { firstname: 'Maggie', lastname: 'Simpson', age: 1 } ]; const config = { header: { uppercase: true, underline: true } }; const table = new Table(data, config); table.print();