Skip to content

Instantly share code, notes, and snippets.

@zackbloom
Last active December 14, 2015 02:49
Show Gist options
  • Save zackbloom/5016764 to your computer and use it in GitHub Desktop.
Save zackbloom/5016764 to your computer and use it in GitHub Desktop.
# The coffeescript
pro = @getAttributes(...)
(pro.pipe ? pro.then) (data) ->
# The output js
pro = this.getAttributes(options);
return ((_ref = pro.pipe) != null ? _ref : pro.then)(function(data) {
# The minified js
b = this.getAttributes(a)
(c = b.pipe) != null ? c : b.then(function (a) {
# It will now return the b.pipe function,
# or the output of b.then()
@TrevorBurnham
Copy link

What settings are you using with Closure Compiler? I'm trying to replicate this issue by pasting the code

window.f = function(pro) {
  pro = this.getAttributes(options);
  return ((_ref = pro.pipe) != null ? _ref : pro.then)(f);
}

into http://closure-compiler.appspot.com/home, but I'm not seeing it in either Simple or Advanced mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment