# @types/html-tableify

> TypeScript definitions for html-tableify

Latest version **0.0.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/html-tableify
pnpm add @types/html-tableify
yarn add @types/html-tableify
bun add @types/html-tableify
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2023-11-07 |
| First published | 2020-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/html-tableify
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-tableify
- npm.io page: https://npm.io/package/@types/html-tableify

## Recent versions

- 0.0.4 (latest) — 2023-11-07
- 0.0.1 (ts3.6) — 2021-07-08
- 0.0.0 (ts3.0) — 2020-07-21
- 0.0.3 — 2023-10-18
- 0.0.2 — 2023-09-16

## README

# Installation
> `npm install --save @types/html-tableify`

# Summary
This package contains type definitions for html-tableify (https://github.com/LingyuCoder/html-tableify#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-tableify.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-tableify/index.d.ts)
````ts
/**
 * Create a HTML table from JSON data.
 *
 * @typeparam T Column name.
 * @param data Array of objects containing values for each key `T`. Each array element represents column data for one
 * row. Columns without a corresponding value appear as an empty cell in the row.
 * @param config Table configuration object for data of keys `T`.
 * @return HTML table string.
 */
declare function tableify<T extends keyof any>(data: Array<tableify.Datum<T>>, config?: tableify.Config<T>): string;

declare namespace tableify {
    type Alignment = "center" | "left" | "right";

    /** Object of optional values for each key `T`. */
    type Datum<T extends keyof any> = {
        [K in T]?: unknown;
    };

    /** Header config object for key `T`. */
    interface Header<T> {
        /** Key in data object. */
        name: T;

        /** Text align of the column. */
        align?: Alignment | undefined;
        /** Title of the column. */
        title?: string | undefined;
    }

    /** Table config object for data with keys `T`. */
    interface Config<T> {
        headers?: Array<Header<T>> | undefined;
        /** Tidy the output HTML. */
        tidy?: boolean | undefined;
    }
}

export = tableify;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [Ciarán Ingle](https://github.com/inglec-arista).

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