keyflector
v1.0.0
Published
Returns an enum with values equal to its keys
Downloads
12
Maintainers
Readme
keyflector
keyflector(obj)
is a function returns an enumeration of keys form obj
and
values equal to each key. This is basically the same as keyMirror()
in
react but seperated in to its own module
for use outside of react apps.
Installation
$ npm install keyflector --save
Example
var keyflector = require('keyflector')
keyflector({
FOO: null,
BAR: null
})
/* => {
FOO: 'FOO',
BAR: 'BAR'
} */