# tabject

> Creates a text table from a given object.

Latest version **0.3.0** (published 2013-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install tabject
pnpm add tabject
yarn add tabject
bun add tabject
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2013-09-28 |
| First published | 2013-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thorsten Lorenz |
| Maintainers | thlorenz |
| Keywords | table, format, object, render, align, tabular |

## Links

- npm: https://www.npmjs.com/package/tabject
- Repository: https://github.com/thlorenz/tabject
- Issues: https://github.com/thlorenz/tabject/issues
- npm.io page: https://npm.io/package/tabject

## Dependencies (1)

- [text-table](https://npm.io/package/text-table.md) ~0.1.1

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2013-09-28
- 0.2.1 — 2013-09-21
- 0.2.0 — 2013-09-21
- 0.1.1 — 2013-09-17
- 0.1.0 — 2013-09-17

## README

# tabject [![build status](https://secure.travis-ci.org/thlorenz/tabject.png)](http://travis-ci.org/thlorenz/tabject)

[![testling badge](https://ci.testling.com/thlorenz/tabject.png)](https://ci.testling.com/thlorenz/tabject)

Creates a text table from a given object.

```js
var pack = require('../package');
var tabject = require('tabject');

console.log(tabject(pack, { maxKeyLength: 10,  maxValueLength: 60, table: { hsep: ' : ' } }));
```

```
name       : "tabject"
version    : "0.1.0"
descrip... : "Creates a text table from a given object."
main       : "index.js"
scripts    : {"test-main":"tap test/*.js","test-0.8":"nave use 0.8 npm...
repository : {"type":"git","url":"git://github.com/thlorenz/tabject.git"}
homepage   : "https://github.com/thlorenz/tabject"
depende... : {"text-table":"~0.1.1"}
devDepe... : {"nave":"~0.4.3","tape":"~1.0.4","tap":"~0.4.3"}
keywords   : ["table","format","object","render","align","tabular"]
author     : {"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url"...
license    : {"type":"MIT","url":"https://github.com/thlorenz/tabject/...
engine     : {"node":">=0.6"}
testling   : {"files":"test/*.js","browsers":["ie/8..latest","firefox/...
```

## Installation

    npm install tabject

## API

###*tabject(obj[, opts])*

Returns a string that represents the object in a tabular manner.

**params:**

- obj *Array|Object* to tabularize
- opts *Object* with the following properties:
  - maxKeyLength: {Number} limits the maximum number of chars for the object keys that are printed
  - maxValueLength: {Number} limits the maximum number of chars for the object values that are printed
  - excludeKeys: {Array[String]} excludes given keys from the tabularized string
  - excludeTypes: {Array[String]} excludes key and values from the tabularized string if the value is of any of the
    given types (default ['function'])
  - wrapKey: {Function} invoked with with (key, valueType), return from it whatever you want to replace the key with
  - wrapValue: {Function} invoked with with (value, valueType), return from it whatever you want to replace the value with
  - tab: {String} used to indent array elements (default: `\t`)
  - table: {Object} options passed through to [text-table](https://github.com/substack/text-table#var-s--tablerows-opts)
    to configure alignment and horizontal separator

**returns:**

*String* tabularized object string


## License

MIT

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