https://github.com/jameshopkins/key-mirror-namespaced
Produces an enumerable with string literal values, each equal to the concatenation of it's ascendant keys.
https://github.com/jameshopkins/key-mirror-namespaced
Last synced: 3 months ago
JSON representation
Produces an enumerable with string literal values, each equal to the concatenation of it's ascendant keys.
- Host: GitHub
- URL: https://github.com/jameshopkins/key-mirror-namespaced
- Owner: jameshopkins
- Created: 2016-01-11T22:07:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-11T22:08:59.000Z (over 9 years ago)
- Last Synced: 2025-02-09T22:03:12.740Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Key Mirror Namespaced
> Produces an enumerable with string literal values, each equal to the concatenation of it's ascendant keys.
This is especially useful for flux/redux implementations where namespaced action types can be in the form of property accessors, which can be referenced through dot notation.
```js
const keyMirror = require('key-mirror-namespaced');const keyMirror({
a: {
b: {
c: {
d: null
}
}
},
e: null
})keyMirror.a.b.c.d // 'a.b.c.d'
keyMirror.e // 'e'
```