# table-style

> CLI table output formatter

Latest version **0.1.4** (published 2016-09-30) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install table-style
pnpm add table-style
yarn add table-style
bun add table-style
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2016-09-30 |
| First published | 2016-06-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ron Buckton |
| Maintainers | rbuckton |

## Links

- npm: https://www.npmjs.com/package/table-style
- Repository: https://github.com/rbuckton/table-style
- Homepage: https://github.com/rbuckton/table-style#readme
- Issues: https://github.com/rbuckton/table-style/issues
- npm.io page: https://npm.io/package/table-style

## Dependencies (2)

- [strip-ansi](https://npm.io/package/strip-ansi.md) ^3.0.1
- [iterable-query](https://npm.io/package/iterable-query.md) ^0.1.0

## Recent versions

- 0.1.4 (latest) — 2016-09-30
- 0.1.3 — 2016-07-06
- 0.1.2 — 2016-07-01
- 0.1.1 — 2016-06-23
- 0.1.0 — 2016-06-23

## README

# table-style
CLI Table formatter for NodeJS

# Installing
For the latest stable version:
```
npm install table-style
```

# Usage
```ts
import { Table } from "table-style";

interface User {
    name: string;
    role: string;
    office: string;
}

const table = new Table<User>({
    border: "single",
    groups: [
        { by: user => user.role }
    ],
    columns: [
        { header: "name", expression: x => x.name },
        { header: "office", expression: x => x.office, align: "right" }
    ],
    rowStyles: [
        { section: "header", border: { bottom: "double" }, foregroundColor: "white" },
        { section: "body", border: { top: "none", bottom: "none" } }
    ]
});

table.render(users, process.out);
```

# API

---
_Source: https://npm.io/package/table-style · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
