Skip to content

Instantly share code, notes, and snippets.

@chenba
Last active January 1, 2016 18:59
Show Gist options
  • Save chenba/8187642 to your computer and use it in GitHub Desktop.
Save chenba/8187642 to your computer and use it in GitHub Desktop.
Uglifying JS because it's possible
function tastywaffles(source, data) {
var call_me_maybe = function(things) {
$.each(things, function(_, thingy) { consume(source, thingy); });
};
data.waffle.switches && call_me_maybe(data.waffle.switches);
data.waffle.flags && call_me_maybe(data.waffle.flags);
data.waffle.samples && call_me_maybe(data.waffle.samples);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment