key-mirror
v1.0.1
Published
A simple key mirror tool pulled out from react.
Downloads
10,679
Readme
key-mirror
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'