Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created June 5, 2015 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/162516d6a55be419d4d0 to your computer and use it in GitHub Desktop.
Save tmcw/162516d6a55be419d4d0 to your computer and use it in GitHub Desktop.
var constants = [
[MAP$QUICK_SWITCHER, "This is the switcher"],
[MAP$TOGGLE_CONSTANTS, ""],
[MAP$TOGGLE_HISTORY, ""],
[MAP$TOGGLE_SETTINGS, ""],
[MAP$TOGGLE_ASSETS, ""],
[MAP$FULLSCREEN, ""],
[MAP$CHEATSHEET, ""]
];
module.exports.constants = constants.map(c => c[0]).reduce((memo, key) => {
memo[key[0]] = key[0];
return memo;
});
module.exports.names = constants.reduce((memo, key) => {
memo[key[0]] = key[1];
return memo;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment