Socket
Book a DemoInstallSign in
Socket

tableize

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tableize

Generate a table-friendly object by flattening and normalizing the keys

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
Source

tableize

Generate a table-friendly object by flattening and normalizing the keys.

Installation

$ npm install tableize

Example

var tableize = require('tableize');

var obj = tableize({
  user: {
    id: 123242123,

    name: {
      first: 'tobi',
      last: 'loki'
    },

    properties: {
      category: 'Buttons',
      label: 'Login'
    },

    context: {
      userAgent: 'Mozilla whatever'
    }
  }
});

console.log(obj);

yields:

{ 'user.id': 123242123,
  'name.first': 'tobi',
  'name.last': 'loki',
  'properties.category': 'Buttons',
  'properties.label': 'Login',
  'context.userAgent': 'Mozilla whatever' }

License

MIT

Keywords

table

FAQs

Package last updated on 24 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts