piui

    0.0.1 • Public • Published

    piui

    Printable UI for Console

    Description

    piui is a UI (user interface) toolkit for console. The name piui is abbreviation of PrIntable User Interface.

    piui

    ToC

    Get Started

    // Require the whole toolkit.
    const piui = require('piui');
     
    // Or, require a standalone component.
    const table = require('piui/table');
     
    const rows = [
        { name: 'Ch-ing', age: 11, gender: 'female' },
        { name: 'Ching', age: 18, gender: 'male' },
    ];
    const columns = [
        { name: 'name', title: 'Name', size: 9 },
        { name: 'age', title: 'Age', align: 'right' },
        { name: 'gender', title: 'Gender', formatter: t => t.toUpperCase() },
    ];
    table.print(rows, { columns });

    Components

    • piui/table
      Create a printable table or print a table directly in console.
      table

    About

    piui grew out of jinang/table and yuan-console. jinang is an incubator prevent sub modules from depending on 3rd packages. And yuan-console is too heavy for those who only wanna display simple components (e.g. a table or a progress bar) in their cli programs. That is why piui is generated.

    Install

    npm i piui

    DownloadsWeekly Downloads

    2

    Version

    0.0.1

    License

    none

    Unpacked Size

    27.9 kB

    Total Files

    9

    Last publish

    Collaborators

    • youngoat