A simple key:val to key:key translator
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test initial Jan 25, 2015
.gitignore initial Jan 25, 2015
.travis.yml initial Jan 25, 2015
LICENSE.md initial Jan 25, 2015
README.md fixes #1 Oct 12, 2015
index.js initial Jan 25, 2015
package.json bump package.json updated README Oct 12, 2015
webpack.config.js initial Jan 25, 2015

README.md

key-mirror

Build Status

Takes in a {key1:val1...keyn:valn} and returns {key1:key1,keyn:keyn} ala Reacts keyMirror.

/** quick usage */

var keyMirror = require('key-mirror');

var ACTIONS = keyMirror({
   UPDATE:null,DELETE:null,ADD:null
});

//ACTIONS.UPDATE === 'UPDATE' 
//ACTIONS.DELETE === 'DELETE'
//ACTIONS.ADD === 'ADD'