Skip to content

Instantly share code, notes, and snippets.

@criso
Created May 17, 2011 01:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save criso/975723 to your computer and use it in GitHub Desktop.
Math[flag ? "min" : "max"](a, b)
// from uglifyjs
if (foo) bar(); else baz(); ==> foo?bar():baz();
if (!foo) bar(); else baz(); ==> foo?baz():bar();
if (foo) bar(); ==> foo&&bar();
if (!foo) bar(); ==> foo||bar();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment