expand-keys

1.0.4 • Public • Published

expand-keys

Release codecov

describe('expandKeys', () => {
  it('expands keys', () => {
    let expected = {
      hello: {
        world: 1,
        galaxy: 2
      },
      three: {
        dots: {
          deep: {
            son: {
              wow: true
            }
          }
        }
      }
    }
    let expanded = expandKeys({
      'hello.world': 1,
      'hello.galaxy': 2,
      'three.dots.deep.son': { wow: true }
    })
    expect(expanded).toEqual(expected)
  })
})

Readme

Keywords

none

Package Sidebar

Install

npm i expand-keys

Weekly Downloads

2

Version

1.0.4

License

ISC

Unpacked Size

3.27 kB

Total Files

3

Last publish

Collaborators

  • patrickleet