keyflector

1.0.0 • Public • Published

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'
*/

Package Sidebar

Install

npm i keyflector

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • brentburgoyne