key-mirror-namespaced

v0.0.1
> Produces an enumerable with string literal values, each equal to the concatenation of it's ascendant keys.

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.

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'
npm i key-mirror-namespaced

Metadata

  • Unknown
  • Whatever
  • James Hopkins
  • released 1/11/2016

Downloads

Maintainers