Skip to content

Instantly share code, notes, and snippets.

@freshtonic
Created May 10, 2013 05:16
Show Gist options
  • Save freshtonic/5552531 to your computer and use it in GitHub Desktop.
Save freshtonic/5552531 to your computer and use it in GitHub Desktop.
Remember to use: x = if foo then bar else baz in coffeescript instead of x = foo ? bar : bar
var _ref;
if (this.searchParams.featured) {
if ((_ref = (this.searchParams.featured || '').toLowerCase() === 'yes') != null) {
_ref;
} else {
({
'yes': 'no'
});
};
} else {
void 0;
}
if @searchParams.featured
(@searchParams.featured || '').toLowerCase() == 'yes' ? 'yes' : 'no'
else
undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment