flattern

1.0.7 • Public • Published

flattern, flat objects

NPM version Build Status Coveralls Status

Get a flat version of the object

Installation

npm install flattern or yarn add flattern

Test the package

npm run test or yarn test

Usage

Example usage:

new Flattern({
    a: 1,
    b: 2,
    c: [3, 4],
    d: { e: 5, f: 6 },
    g: { h: { i: 7 } }
})

The response:

{
    a: 1,
    b: 2,
    "c.0": 3,
    "c.1": 4,
    "d.e": 5,
    "d.f": 6,
    "g.h.i": 7
}

Readme

Keywords

Package Sidebar

Install

npm i flattern

Weekly Downloads

9

Version

1.0.7

License

MIT

Unpacked Size

11.6 kB

Total Files

4

Last publish

Collaborators

  • epeus
  • w3news