Skip to content

lagden/unflatten-object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unflatten

NPM version Build Status Coverage Status XO code style


Unflatten a flat object

Install

$ npm i -S @tadashi/unflatten-object

Usage

import unflatten from '@tadashi/unflatten-object'

const unflat = unflatten({
  'a.b.c': 'foo',
  'a.d': 'bar'
})
// => {
//      a: {
//        b: {
//          c: 'foo'
//        },
//        d: 'bar'
//      }
//    }

License

MIT © Thiago Lagden