# tableize-object [![NPM version](https://img.shields.io/npm/v/tableize-object.svg?style=flat)](https://www.npmjs.com/package/tableize-object) [![NPM downloads](https://img.shields.io/npm/dm/tableize-object.svg?style=flat)](https://npmjs.org/package/tableize-object) [![Build Status](https://img.shields.io/travis/jonschlinkert/tableize-object.svg?style=flat)](https://travis-ci.org/jonschlinkert/tableize-object)

> Tableize an object by flattening its keys into object paths (dot-notation).

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install tableize-object --save
```

This is a simplified version of [tableize](https://github.com/segmentio/tableize), which also lower-cases keys and replaces spaces and dashes in keys with underscores. This library doesn't modify keys.

## Usage

```js
var tableize = require('tableize-object');

var obj = {
  foo: {
    bar: {
      baz: 'qux',
      fez: 'foo'
    },
    a: 'b',
    c: 'b',
    d: 'b',
  }
};

console.log(tableize(obj));
// results in:
//{ 'foo.bar.baz': 'qux',
//  'foo.bar.fez': 'foo',
//  'foo.a': 'b',
//  'foo.c': 'b',
//  'foo.d': 'b' }
```

## Related projects

You might also be interested in these projects:

* [collapse-object](https://www.npmjs.com/package/collapse-object): Collapse an object into a string using the syntax from expand-object. This syntax is pretty… [more](https://www.npmjs.com/package/collapse-object) | [homepage](https://github.com/jonschlinkert/collapse-object)
* [expand-object](https://www.npmjs.com/package/expand-object): Expand a string into a JavaScript object using a simple notation. Use the CLI or… [more](https://www.npmjs.com/package/expand-object) | [homepage](https://github.com/jonschlinkert/expand-object)
* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value)
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject)
* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value)
* [stringify-keys](https://www.npmjs.com/package/stringify-keys): Build an array of key paths from an object. | [homepage](https://github.com/doowb/stringify-keys)

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/tableize-object/issues/new).

## Building docs

Generate readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install verb && npm run docs
```

Or, if [verb](https://github.com/verbose/verb) is installed globally:

```sh
$ verb
```

## Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

## Author

**Jon Schlinkert**

Follow me on GitHub or Twitter for updates about tableize-object and my other libraries:

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/tableize-object/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v, on April 07, 2016._