Skip to content

larswaechter/voici.js

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
February 21, 2023 17:11
March 5, 2023 17:51
src
February 27, 2023 17:32
February 27, 2023 17:32
March 8, 2022 15:53
March 7, 2022 22:55
March 7, 2022 22:55
February 27, 2023 17:32
March 5, 2023 17:51
March 5, 2023 17:51
April 3, 2022 20:48
April 2, 2022 13:35
March 7, 2022 22:55

voici.js

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

npm version GitHub license Documentation Tests Linter

📍 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:

npm i --save voici.js

🔨 Usage

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 table = new Table(data);
table.print();

The console output:

  firstname    lastname    age
================================
  Homer        Simpson     39
  Marge        Simpson     36
  Bart         Simpson     10
  Lisa         Simpson     8
  Maggie       Simpson     1

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.