flattenkeys
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

flattenkeys

Flatten out keys of an object - node module

Changes

v2

  • typescriptified
  • removed eslint
  • explicitely typed code

Usage

const flattenkeys = require('flattenkeys')

flattenkeys({a: 'a', b: {c: 'c', e: {f: 'f', g: 'g', h: {i: 'i'}}}, d: 'd'})
    ['a', 'b.c', 'b.e.f', 'b.e.g', 'b.e.h.i', 'd']

flattenkeys({a: 'a', b: {c: 'c', e: {f: 'f', g: 'g'}}, d: 'd'})
    ['a', 'b.c', 'b.e.f', 'b.e.g', 'd']

flattenkeys({a: 'a', b: {c: 'c', e: {f: 'f'}}, d: 'd'})
    ['a', 'b.c', 'b.e.f', 'd']

flattenkeys({a: 'a', b: {c: 'c'}, d: 'd'})
    ['a', 'b.c', 'd']

License

MIT © Git Faf 2018

Readme

Keywords

none

Package Sidebar

Install

npm i flattenkeys

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

17.4 kB

Total Files

20

Last publish

Collaborators

  • iamanubhavsaini
  • git.faf