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)
})
})
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
forked from patrickleet/expand-keys
-
Notifications
You must be signed in to change notification settings - Fork 3
418sec/expand-keys
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
expands object's keys with dots to nested objects
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- JavaScript 100.0%