Voici.js

A Node.js library for pretty printing your data on the terminal

README

voici.js


A Node.js library for pretty printing your data on the terminal🎨

📍 Introduction


voici.js (_speak_: /vwasi/) is an open source Node.js library written in TypeScript for beautifully displaying datasets in tabular form on the terminal, including features like:

- Text & column & row styling
- Highlighting & filtering
- Dynamic columns
- Column sizing
- Accumulation
- Table export
- Type System
- Sorting

and many more!

Check out the GitBook for more features or create an issue if you're missing one.

💻 Installation


Install via npm:

  1. ```bash
  2. npm i --save voici.js
  3. ```

🔨 Usage


  1. ```js
  2. import { Table } from 'voici.js';

  3. const data = [
  4.   { firstname: 'Homer', lastname: 'Simpson', age: 39 },
  5.   { firstname: 'Marge', lastname: 'Simpson', age: 36 },
  6.   { firstname: 'Bart', lastname: 'Simpson', age: 10 },
  7.   { firstname: 'Lisa', lastname: 'Simpson', age: 8 },
  8.   { firstname: 'Maggie', lastname: 'Simpson', age: 1 }
  9. ];

  10. const table = new Table(data);
  11. table.print();
  12. ```

The console output:

  1. ```
  2.   firstname    lastname    age
  3. ================================
  4.   Homer        Simpson     39
  5.   Marge        Simpson     36
  6.   Bart         Simpson     10
  7.   Lisa         Simpson     8
  8.   Maggie       Simpson     1
  9. ```

You can find many more examples here.

📚 Documentation


The following documentations are available:


Otherwise check out the tests for more examples.

🧩 Contributing


Any contribution is appreciated! See CONTRIBUTING.md

🔑 License


voici.js is released under MIT license.