1.0.4 • Published 3 years ago
expand-keys v1.0.4
expand-keys
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)
})
})